On this page
  1. math.expm1
  2. Import
  3. Signature & Overview
  4. Usage
  5. Gotchas
  6. REPL Inspect

math.expm1

Prev: math.exp2 | Up: math | Next: math.fabs
Rel: math.acos, math.acosh, math.asin, math.asinh
Ref: docs.python.org — math.expm1
Tags: #public #python3 #stdlib #math


Import

import math
from math import expm1

Signature & Overview

math.expm1(x, /)

Return exp(x)-1.

Usage

import math

x = 1e-10
assert math.isclose(math.expm1(x), x, rel_tol=1e-9)

Gotchas

REPL Inspect

from math import expm1
help(expm1)

Linked from

Related notes