Implementation status: to be implemented
double expm1(double x);
float expm1f(float x);
long double expm1l(long double x);
The functions compute the base-
e exponential function of x minus
1.0, which is
e raised to the power x minus
x - the value of which the 'e'x-'1' is computed.
An application wishing to check for error situations sets
errno to zero and calls
feclearexcept(FE_ALL_EXCEPT) before calling these functions. On return, if
errno is non-zero or
fetestexcept(FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW) is non-zero, an error has occurred.
Upon successful completion, these functions return
If the correct value causes overflow, a range error occurs and
expm1l() return the value of the macro
If x is
NaN is returned.
If x is
±0 is returned.
If x is -
-1 is returned.
If x is +
Inf, x is returned.
If x is subnormal, a range error may occur and x is returned.
If x is not returned,
expm1l() return an implementation-defined value no greater in magnitude than
ERANGE] - the result overflows (overflow floating-point exception is raised) or the value of x is subnormal.
On error, the expressions (
math_errhandling & MATH_ERRNO) and (
math_errhandling & MATH_ERREXCEPT) are independent of each other, but at least one of them must be non-zero.