Returns the logarithm of 1 plus the argument.

Namespace: Extreme.Mathematics
Assembly: Extreme.Numerics (Extreme.Numerics)

Syntax

Visual Basic (Declaration)
Public Shared Function Log1PlusX ( _
	x As Double _
) As Double
C#
public static double Log1PlusX (
	double x
)
C++
public:
static double Log1PlusX (
	double x
)

Parameters

x (System.Double)
A real number greater than -1.

Return Value

The logarithm of 1 plus x.

Remarks

For small values of x, the logarithm of 1 + x is close to zero. When the logarithm is evaluated directly, this can cause significant round-off error. This function resolves this problem by using a direct approximations for x close to 1.

Exceptions

ExceptionCondition
ArgumentOutOfRangeExceptionx is less than or equal to -1.