Returns the natural logarithm of the sum of the argument and 1.
Note that for small values x, the result of
log1p(x) is much closer to the true result of ln(1
+ x) than the floating-point evaluation of
log(1.0+x).
Special cases:
The computed result must be within 1 ulp of the exact result. Results must be semi-monotonic.
x | a value |
x + 1), the natural
log of x + 1
Diagram: Math