sinh() - Mathematical Function
How is Mathematical Function "sinh()" used in C++?
How to find the Hyperbolic sine value of an argument using c++?
Explanation
sinh() is a Mathematical Function that returns hyperbolic sine value for the given argument. If this function returns a large value, then it returns "HUGE_VAL" with the same sign as the value of operation, then the global variable "errno" is set to "ERANGE".
Syntax to find Hyperbolic sine value:
float sinh ( float arg);
double sinh ( double arg);
long double sinh ( long double arg);
Example :
#include <stdio.h> #include <math.h> int main() { for (double arg=-1.0;arg<=1.0; arg+=.5) { printf("Hyperbolic sine value of %f is:: %f.\n", arg, sinh(arg)); } return 0; } |
Result :
Hyperbolic sine value of
-1.000000
is:: -1.175201.
Hyperbolic sine value of
-0.500000
is:: -0.521095.
Hyperbolic sine value of
0.000000
is:: 0.000000.
Hyperbolic sine value of
0.500000
is:: 0.521095.
Hyperbolic sine value of
1.000000
is:: 1.175201.
In the above example sinh() is used to find hyperbolic sine values in the range "-1.0 to 1.0" by increasing the value by ".5".