MoreMathExpMinusOne Method

Computes ex-1.

Definition

Namespace: Meta.Numerics
Assembly: Meta.Numerics (in Meta.Numerics.dll) Version: 4.2.0+6d77d64445f7d5d91b12e331399c4362ecb25333
C#
public static double ExpMinusOne(
	double x
)

Parameters

x  Double
The argument.

Return Value

Double
The value of ex-1.

Remarks

If x is close to 0, then ex is close to 1, and computing ex-1 by Math.Exp(x) - 1.0 will be subject to severe loss of significance due to cancelation. This method maintains full precision for all values of x by switching to a series expansion when x is near zero.

See Also