C++ Math sinh
The function calculates the hyperbolic sine of an angle provided in radians.
Mathematically,
Syntax
Suppose the hyperbolic angle is x:
float sinh(float x);
double sinh(double x);
long double sinh(long double x);
double sinh(integral x);
Parameter
x : The value representing the hyperbolic anle.
Return value
It returns the hyperbolic sine of an angle.
Example 1
Let's see a simple example.
#include <iostream>
#include<math.h>
using namespace std;
int main()
{
int x=90;
float radian=x*3.14/180;
std::cout << "Value of degree is: " << x<<std::endl;
cout<<"sinh(radian): "<<sinh(radian);
return 0;
}
Output:
Value of degree is: 90
sinh(radian): 2.2993
In this instance, the sinh function calculates the hyperbolic sine of a 90-degree angle and provides a result of 2.2993.
Example 2
Let's see another simple example.
#include <iostream>
#include<math.h>
using namespace std;
int main()
{
float x=56.4;
float radian=x*3.14/180;
std::cout << "Value of degree is :" << x<<std::endl;
cout<<"sinh(radian): "<<sinh(radian);
return 0;
}
Output:
Value of degree is :56.4
sinh(radian): 1.15046
In this instance, the sinh method calculates the hyperbolic sine of the angle 56.4 and yields the result of 1.15.