C++ cmath acosh() function
Example
Return the inverse hyperbolic cosine of different numbers:
cout << acosh(7);
cout << acosh(56);
cout << acosh(2.45);
Try it Yourself »
Definition and Usage
The acosh()
function returns the inverse hyperbolic cosine of a number.
The acosh()
function is defined in the <cmath>
header file.
Syntax
One of the following:
acosh(double number);
acosh(float number);
Parameter Values
Parameter | Description |
---|---|
number |
Required. A number to find the inverse hyperbolic cosine of. If the value is less than 1, the function returns NaN (Not a Number). If the number is an integer type then it will be treated as a double .
|
Technical Details
Returns: | A float value (if the argument is float) or double value (in any other case) representing the inverse hyperbolic cosine of a number. |
---|