C++ cmath atanh() function
Example
Return the inverse hyperbolic tangent of different numbers:
cout << atanh(0.78);
cout << atanh(0.5);
cout << atanh(1);
Try it Yourself »
Definition and Usage
The atanh()
function returns the inverse hyperbolic tangent of a number.
The atanh()
function is defined in the <cmath>
header file.
Syntax
One of the following:
atanh(double number);
atanh(float number);
Parameter Values
Parameter | Description |
---|---|
number |
Required. A number to find the inverse hyperbolic tangent of, in the range -1 to 1. If the value is outside -1 to 1, it returns NaN (Not a Number). If the value is equal to -1 or 1 it returns -infinity or infinity. 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 tangent of a number. |
---|