# asinh() function in C++ STL

The asinh() is an inbuilt function in C++ STL which returns the inverse hyperbolic sine of an angle given in radians.

Syntax:

```asinh(data_type x)
```

Parameter: The function accepts one mandatory parameter x which specifies the inverse hyperbolic angle in radian. It can be any value i.e. negative, positive or zero. The parameter can be of double, float or long double datatype.

Return Value: This function returns the inverse hyperbolic sine of the argument in radians.

Below programs demonstrate the above function:

Program 1:

 `// C++ program to demonstrate ` `// the asinh() function ` `#include ` `using` `namespace` `std; ` ` `  `int` `main() ` `{ ` `    ``double` `x = 50.0; ` ` `  `    ``// Function call to calculate asinh(x) value ` `    ``double` `result = asinh(x); ` ` `  `    ``cout << ``"asinh(50.0) = "` `<< result << ``" radians"` `<< endl; ` `    ``cout << ``"asinh(50.0) = "` `<< result * 180 / 3.141592 ` `         ``<< ``" degrees"` `<< endl; ` `    ``return` `0; ` `} `

Output:

```asinh(50.0) = 4.60527 radians
asinh(50.0) = 263.863 degrees
```

Program 2:

 `// C++ program to demonstrate ` `// the asinh() function ` `#include ` `using` `namespace` `std; ` ` `  `int` `main() ` `{ ` `    ``int` `x = -50.0; ` ` `  `    ``// Function call to calculate asinh(x) value ` `    ``double` `result = asinh(x); ` ` `  `    ``cout << ``"asinh(-50.0) = "` `<< result << ``" radians"` `<< endl; ` `    ``cout << ``"asinh(-50.0) = "` `<< result * 180 / 3.141592 ` `         ``<< ``" degrees"` `<< endl; ` `    ``return` `0; ` `} `

Output:

```asinh(-50.0) = -4.60527 radians
asinh(-50.0) = -263.863 degrees
```

Errors and Exceptions: The function returns no matching function for call to error when a string or character is passed as an argument.
Program 3:

 `// C++ program to demonstrate ` `// the asinh() function ` `#include ` `using` `namespace` `std; ` ` `  `int` `main() ` `{ ` `    ``string x = ``"gfg"``; ` ` `  `    ``// Function call to calculate asinh(x) value ` `    ``double` `result = asinh(x); ` ` `  `    ``cout << ``"asinh(50.0) = "` `<< result << ``" radians"` `<< endl; ` `    ``cout << ``"asinh(50.0) = "` `<< result * 180 / 3.141592 ` `         ``<< ``" degrees"` `<< endl; ` `    ``return` `0; ` `} `

Output :

```prog.cpp:11:25: error: no matching function for call to 'asinh(std::__cxx11::string&)'
double result = asinh(x);
```

Don’t stop now and take your learning to the next level. Learn all the important concepts of Data Structures and Algorithms with the help of the most trusted course: DSA Self Paced. Become industry ready at a student-friendly price.

My Personal Notes arrow_drop_up Check out this Author's contributed articles.

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.

Article Tags :
Practice Tags :

Be the First to upvote.

Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.