LOG1P(3) Library Functions Manual LOG1P(3)

log1pcompute a natural logarithm

#include <math.h>

double log1p (double x);

The log1p() function computes log e (1.0 + x ). The value of x must be greater than -1.0.

Upon successful completion, log1p() returns the natural logarithm of 1.0 + x.

If x is NaN, log1p() returns NaN and may set errno to [EDOM].

If x is less than -1.0, log1p() returns -HUGE_VAL or NaN and sets errno to [EDOM].

If x is -1.0, log1p() returns -HUGE_VAL and may set errno to [ERANGE].

The log1p() function will fail if:

The value of x is less than -1.0.

The log1p() function may fail and set errno to:

The value of x is NaN.
The value of x is -1.0.

No other errors will occur.

None.

None.

None.

log(3) , <math.h> .

February 1997 posix.fail