Computes exponential functions.
#include <math.h>
float expm1f (x)
float x;
long double expm1l (x)
long double x;
double expm1 (x)
double x;_Decimal32 expm1d32 (x)
_Decimal32 x;
_Decimal64 expm1d64 (x)
_Decimal64 x;
_Decimal128 expm1d128 (x)
_Decimal128 x;
The expm1f, expm1l, expm1, expm1d32, expm1d64, and expm1d128 subroutines compute ex- 1.0.
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. Upon return, if errno is nonzero or fetestexcept(FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW) is nonzero, an error has occurred.
Item | Description |
---|---|
x | Specifies the value to be computed. |
Upon successful completion, the expm1f, expm1l, expm1, expm1d32, expm1d64, and expm1d128 subroutines return ex- 1.0.
If the correct value would cause overflow, a range error occurs and the expm1f, expm1l, expm1, expm1d32, expm1d64, and expm1d128 subroutines return the value of the macro HUGE_VALF, HUGE_VALL, HUGE_VAL, HUGE_VAL_D32, HUGE_VAL_D64, and HUGE_VAL_D128 respectively.
If x is NaN, a NaN is returned.
If x is ±0, ±0 is returned.
If x is -Inf, -1 is returned.
If x is +Inf, x is returned.
If x is subnormal, a range error may occur and x is returned.