Computes a natural logarithm.
#include <math.h> float log1pf (x) float x; long double log1pl (x) long double x; double log1p (x) double x;
The log1pf, log1pl, and log1p subroutines compute loge (1.0 + x).
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 subroutines. Upon return, if errno is nonzero or fetestexcept(FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW) is nonzero, an error has occurred.
x | Specifies the value to be computed. |
Upon successful completion, the log1pf, log1pl, and log1p subroutines return the natural logarithm of 1.0 + x.
If x is -1, a pole error occurs and the log1pf, log1pl, and log1p subroutines return -HUGE_VALF, -HUGE_VALL, and -HUGE_VAL, respectively.
For finite values of x that are less than -1, or if x is -Inf, a domain error occurs, and a NaN is returned.
If x is NaN, a NaN is returned.
If x is ±0, or +Inf, x is returned.
If x is subnormal, a range error may occur and x should be returned.
feclearexcept Subroutine and fetestexcept Subroutine.
math.h in AIX 5L Version 5.2 Files Reference.