StrictMath.Log1p(Double) Method

Definition

Returns the natural logarithm of the sum of the argument and 1.

[Android.Runtime.Register("log1p", "(D)D", "")]
public static double Log1p (double x);
[<Android.Runtime.Register("log1p", "(D)D", "")>]
static member Log1p : double -> double

Parameters

x
Double

a value

Returns

the value ln(x&nbsp;+&nbsp;1), the natural log of x&nbsp;+&nbsp;1

Attributes

Remarks

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: <ul>

<li>If the argument is NaN or less than -1, then the result is NaN.

<li>If the argument is positive infinity, then the result is positive infinity.

<li>If the argument is negative one, then the result is negative infinity.

<li>If the argument is zero, then the result is a zero with the same sign as the argument.

</ul>

Added in 1.5.

Java documentation for java.lang.StrictMath.log1p(double).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to