Copyright © 1997 The Open Group

log1p - compute a natural logarithm

`#include <math.h> double log1p (double`

x);

Thelog1p()function computes log_{e}(1.0 +x). The value ofxmust be greater than -1.0.

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

xis NaN,log1p()returns NaN and may seterrnoto [EDOM].If

xis less than -1.0,log1p()returns -HUGE_VAL or NaN and setserrnoto [EDOM].If

xis -1.0,log1p()returns -HUGE_VAL and may seterrnoto [ERANGE].

Thelog1p()function will fail if:

- [EDOM]
- The value of
xis less than -1.0.The

log1p()function may fail and seterrnoto:

- [EDOM]
- The value of
xis NaN.- [ERANGE]
- The value of
xis -1.0.No other errors will occur.

None.

None.

None.

log(),<math.h>.

Copyright © 1997 The Open Group

[ Main Index | XSH | XCU | XBD | XCURSES | XNS ]