atanhl Function

Calculates the trigonometric arc hyperbolic tangent function of a double precision floating-point value.

Include

<math.h>

Prototype

long double atanh(long double x);

Argument

x
value for which to return the arc hyperbolic tangent

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)
{
  long double x, y;

  x = 0.5;
  y = atanhl(x);
  printf("The arc hyperbolic tangent of %Lf is %Lf\n", x, y);

  x = -1.0;
  y = atanhl(x);
  printf("The arc hyperbolic tangent of %Lf is %Lf\n", x, y);
}

Example Output

The arc hyperbolic tangent of 0.500000 is 0.549306
The arc hyperbolic tangent of -1.000000 is -inf