Calculates the trigonometric arc hyperbolic tangent function of a single precision floating-point value.
Include
<math.h>
Prototype
float atanhf(float x);
Argument
x
Return Value
Returns the arc hyperbolic tangent.
Remarks
A domain error occurs for arguments not in the range of −1 to 1. A range error might occur if the argument equals −1 or +1.
Example
#include <math.h>
#include <stdio.h>
int main(void)
{
float x, y;
x = 0.5;
y = atanhf(x);
printf("The arc hyperbolic tangent of %f is %f\n", x, y);
x = -1.0;
y = atanhf(x);
printf("The arc hyperbolic tangent of %f is %f\n", x, y);
}
Example Output
The arc hyperbolic tangent of 0.500000 is 0.549306
The arc hyperbolic tangent of -1.000000 is -inf