function
<cmath> <ctgmath>
atanh
double atanh (double x);
float atanhf (float x);
long double atanhl (long double x);
double atanh (double x);
float atanh (float x);
long double atanh (long double x);
double asinh (T x); // additional overloads for integral types
Compute arc hyperbolic tangent
Returns the arc hyperbolic tangent of x, expressed in radians.
The arc hyperbolic tangent is the inverse operation of the hyperbolic tangent.
Header
<tgmath.h> provides a type-generic macro version of this function.
Parameters
- x
- Value whose arc hyperbolic tangent is computed, in the interval
[-1,+1]
.
If the argument is out of this interval, a domain error occurs.
For values of -1
and +1
, a pole error may occur.
Example
1 2 3 4 5 6 7 8 9 10 11 12
|
/* atanh example */
#include <stdio.h> /* printf */
#include <math.h> /* tanh, atanh */
int main ()
{
double param, result;
param = tanh(1);
result = atanh(param) ;
printf ("The arc hyperbolic tangent of %f is %f radians.\n", param, result);
return 0;
}
|
Output:
The arc hyperbolic tangent of 0.761594 is 1.000000 radians.
|
See also
- tanh
- Compute hyperbolic tangent (function
)
- asinh
- Compute arc hyperbolic sine (function
)
- acosh
- Compute arc hyperbolic cosine (function
)