atanh(), atanhf(), atanhl() — Calculate hyperbolic arctangent

Standards

Standards / Extensions C or C++ Dependencies
XPG4.2
C99
Single UNIX Specification, Version 3
C++ TR1 C99
both  

Format

#define _XOPEN_SOURCE_EXTENDED 1
#include <math.h>

double atanh(double x);
C99:
#define _ISOC99_SOURCE
#include <math.h>

float atanhf(float x);
long double atanhl(long double x);
C++ TR1 C99
#define _TR1_C99
#include <math.h>
float atanh(float x);  
long double atanh(long double x);

General description

The atanh() function returns the hyperbolic arctangent of its argument x.
Note: The following table shows the viable formats for these functions. See IEEE binary floating-point for more information about IEEE Binary Floating-Point.
Function Hex IEEE
atanh X X
atanhf X X
atanhl X X

Returned value

If successful, atanh() returns the hyperbolic arctangent of its argument x.

atanh() fails, returns 0.0 and sets errno to one of the following values:
Error Code
Description
EDOM
The x argument has a value greater than 1.0.
ERANGE
The x argument has a value equal to 1.0.

Special behavior for IEEE: If successful, the function returns the hyperbolic arctangent of its argument x.

If the absolute value of x is greater than 1.0, atanh() sets errno to EDOM and returns NaNQ. If the value of x is equal to 1.0, the function sets errno to ERANGE and returns +HUGE_VAL.

Related information