On this page
math.exp
Prev: math.erfc | Up: math | Next: math.exp2
Rel: math.acos, math.acosh, math.asin, math.asinh
Ref: docs.python.org — math.exp
Tags: #public #python3 #stdlib #math
Import
import math
from math import exp
Signature & Overview
math.exp(x, /)
Return e raised to the power of x.
Usage
import math
assert math.isclose(math.exp(1.0), math.e)
assert math.isclose(math.exp(0.0), 1.0)
Gotchas
- Raises
OverflowErrorforx > ~709.78: Forexp(x) - 1nearx = 0, prefermath.expm1(x).
REPL Inspect
from math import exp
help(exp)
Linked from
Related notes
- tuts/python3/stdlib_module/math/erfc Linked here; links to this page; shared tags: #math, #stdlib
- tuts/python3/stdlib_module/math/exp2 Linked here; links to this page; shared tags: #math, #stdlib
- tuts/python3/stdlib_module/math Linked here; links to this page; shared tags: #stdlib
- tuts/python3/stdlib_module/math/acos Linked here; shared tags: #math, #stdlib
- tuts/python3/stdlib_module/math/acosh Linked here; shared tags: #math, #stdlib
- tuts/python3/stdlib_module/math/asin Linked here; shared tags: #math, #stdlib
- tuts/python3/stdlib_module/math/asinh Linked here; shared tags: #math, #stdlib
- tuts/c/stdlib/math shared tags: #math, #stdlib
- tuts/c/stdlib/math/fabs shared tags: #math, #stdlib
- tuts/c/stdlib/math/floor shared tags: #math, #stdlib