Facebook Page Twitter Page LinkedIn Page
× C Standard Library

The C <math.h> atanh() function returns inverse hyperbolic tangent of a value. The hyperbolic tangent of x is defined as:



double atanh (double x);
float atanhf (float x);
long double atanhl (long double x);


x Specify the value in range [-1, 1].

Return Value

Returns the hyperbolic tangent of a value.
If the x is not in the range of [-1, 1], domain error occurs.
If the x is -1 or 1, pole error may occur.


In the below example, atanh() function is used to find out the hyperbolic tangent of a value.

#include <stdio.h>
#include <math.h>
int main (){
  printf("%lf\n", atanh(0.1));
  printf("%lf\n", atanh(0.5));
  printf("%lf\n", atanh(2));
  return 0;

The output of the above code will be:


❮ C <math.h> Library