EXPM1

Purpose:

Computes exp(x) - 1 for small x.

Syntax:

EXPM1(x)

x

-

A scalar, series or table.

Returns:

A scalar, series, or table.

Example:

expm1(1e-17)

 

returns 1.000000E-17.

 

exp(1e-17) - 1

 

returns 0.0.

Example:

expm1(log1p(1e-17))

 

returns 1.000000E-17.

 

exp(log(1 + 1e-17)) - 1

 

returns 0.0.

Remarks:

For real values, EXPM1 is accurate for small x where 1 + x == 1 for double precision accuracy.

 

For small x, EXPM1(x) is approximately x, but EXP(x) - 1 is approximately 0 for double precision accuracy.

 

See LOG1P to compute LOG(1 + x) for small x, the inverse of EXPM1.

See Also:

EXP

LOG

LOG10

LOG1P

LOG2

LN