English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
C ++sinh() function.
The function returns the hyperbolic sine value of the angle expressed in radians in<cmath>defined in the header file.
[Mathematics] sinh x = sinh(x) [C++]
double sinh(double x); float sinh(float x); long double sinh(long double x); double sinh(T x); //For integer type.
The sinh() function accepts a radian parameter and returns the hyperbolic sine value of the angle in double, float, or long double type.
The hyperbolic sine of x is given by the following formula:
The sinh() function takes a single mandatory parameter, representing the hyperbolic angle in radians.
The sinh() function returns the hyperbolic sine value of the parameter.
If the size of the result is too large to be represented by the return type value, the function will return HUGE_VAL with the correct sign, and an overflow range error will occur.
#include <iostream> #include <cmath> using namespace std; int main() { double x = 3.55, result; result = sinh(x); cout << "sinh(x) = " << result << endl; double xDegrees = 90; x = xDegrees * 3.14159/180; result = sinh(x); cout << "sinh(x) = " << result << endl; return 0; }
When running this program, the output is:
sinh(x) = 17.3923 sinh(x) = 2.3013
#include <iostream> #include <cmath> using namespace std; int main() { int x = -3; double result; result = sinh(x); cout << "sinh(x) = " << result << endl; return 0; }
When running this program, the output is:
sinh(x) = -10.0179