C++ Math asinh
The function calculates the inverse hyperbolic sine of an angle provided in radians.
Whereas, an arc of hyperbolic sine represents the inverse function of hyperbolic sine.
Syntax
Suppose an angle given in radian is 'x':
float asinh(float x);
double asinh(double x);
long double asinh(long double x);
double asinh(integral x);
Parameter
The x variable represents the value for which the inverse hyperbolic sine function is calculated.
Return value
The function calculates and returns the inverse hyperbolic sine value of an angle specified in radians.
Example 1
Let's observe a basic scenario where the degree value is of integer data type.
#include <iostream>
#include<math.h>
using namespace std;
int main()
{
int degree =90;
float x = degree*3.14/180;
std::cout << "Value of degree is : " <<degree<< std::endl;
cout<<"sinh(x) : "<<sinh(x)<<'\n';
cout<<"asinh(x) : "<<asinh(x);
return 0;
}
Output:
Value of degree is : 90
sinh(x) : 2.2993
asinh(x) : 1.23298
In this instance, the asinh function calculates the inverse hyperbolic sine of x and outputs the result as 1.23.
Example 2
Let's consider a basic scenario where the degree value is of the float data type.
#include <iostream>
#include<math.h>
using namespace std;
int main()
{
float degree = 45.5;
float x = degree*3.14/180;
std::cout << "Value of degree is : " <<degree<< std::endl;
cout<<"sinh(x) : "<<sinh(x)<<'\n';
cout<<"asinh(x) : "<<asinh(x);
return 0;
}
Output:
Value of degree is : 45.5
sinh(x) : 0.879727
asinh(x) : 0.727759
In this instance, the asinh function calculates the inverse hyperbolic sine of x and outputs the result as 0.72.