Elementary.LogOnePlusExp Method

Returns the logarithm of one plus the exponential of the specified value.

Definition

Namespace: Numerics.NET
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.6.0
C#
public static double LogOnePlusExp(
	double x
)

Parameters

x  Double
A real number.

Return Value

Double
The value of log(1 + exp(x)).

Remarks

This method evaluates log(1 + exp(x)) using a numerically stable form that avoids overflow for large positive values of x and avoids loss of precision for large negative values.

See Also