public static native double log1p (double x)

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:

- If the argument is NaN or less than -1, then the result is NaN.
- If the argument is positive infinity, then the result is positive infinity.
- If the argument is negative one, then the result is negative infinity.
- If the argument is zero, then the result is a zero with the same sign as the argument.

`x` | a value |

` x`

+ 1), the natural
log of ` x`

+ 1

Diagram: Math