compute the inverse hyperbolic tangent
#include <math.h> double atanh( double x );
The atanh() function computes the inverse hyperbolic tangent of x. A domain error occurs if the value of x is outside the range (-1,1).
The inverse hyperbolic tangent value.
When the argument is outside the permissible range, the matherr() function is called. Unless the default matherr() function is replaced, it will set the global variable errno to EDOM, and print a "DOMAIN error" diagnostic message using the stderr stream.
#include <stdio.h> #include <math.h> void main() { printf( "%f\n", atanh( 0.5 ) ); }
produces the output:
0.549306
WATCOM
Safety: | |
---|---|
Interrupt handler | No |
Signal handler | No |
Thread | Yes |
acosh(), asinh(), errno, matherr(), tanh()