atanh, atanhf, atanhl, atanhd32, atanhd64, and atanhd128 Subroutines

Purpose

Computes the inverse hyperbolic tangent.

Syntax

#include <math.h>

float atanhf (x)
float x;

long double atanhl (x)
long double x;

double atanh (x)
double x;
_Decimal32 atanhd32 (x)
_Decimal32 x;

_Decimal64 atanhd64 (x)
_Decimal64 x;

_Decimal128 atanhd128 (x)
_Decimal128 x;

Description

The atanhf, atanhl, atanh, atanhd32, atanhd64, and atanhd128 subroutines compute the inverse hyperbolic tangent of the x parameter.

An application wishing to check for error situations should set the errno global variable to zero and call feclearexcept(FE_ALL_EXCEPT) before calling these functions. On return, if errno is nonzero or fetestexcept(FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW) is nonzero, an error has occurred.

Parameters

Item Description
x Specifies the value to be computed.

Return Values

Upon successful completion, the atanhf, atanhl, atanh, atanhd32, atanhd64, and atanhd128 subroutines return the inverse hyperbolic tangent of the given argument.

If x is ±1, a pole error occurs, and atanhf, atanhl , atanh, atanhd32, atanhd64, and atanhd128 return the value of the macro HUGE_VALF, HUGE_VALL, HUGE_VAL, HUGE_VAL_D32, HUGE_VAL_D64, and HUGE_VAL_D128 respectively, with the same sign as the correct value of the function.

For finite |x|>1, a domain error occurs, and a NaN is returned.

If x is NaN, a NaN is returned.

If x is 0, x is returned.

If x is ±Inf, a domain error shall occur, and a NaN is returned.

If x is subnormal, a range error may occur and x is returned.

Error Codes

The atanhf, atanhl, atanh, atanhd32, atanhd64, and atanhd128 subroutines return NaNQ and set errno to EDOM if the absolute value of x is greater than the value of one.