Elementary.Log One Plus Exp 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#
The value of log(1 + exp(x)).
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.6.0
public static double LogOnePlusExp(
double x
)Parameters
- x Double
- A real number.
Return Value
DoubleThe 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.