Math Functions

math.expm1()

Compute e to the power x minus one, avoiding cancellation when x is near zero.

Formal Syntax & Structure

python syntaxpython
math.expm1(x, /)

Parameters & Attributes

NameTypeDescription
xreal numberInput real value.

Return Value

float

Floating-point result; finite precision and domain restrictions apply.

Working Example

Example Snippetpython
import mathprint(math.expm1(0))
Python Reference