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

cmath.exp

Prev: cmath.cosh | Up: cmath | Next: cmath.isclose
Rel: cmath.acos, cmath.acosh, cmath.asin, cmath.asinh
Ref: docs.python.org — cmath.exp
Tags: #public #python3 #stdlib #cmath


Import

import cmath
from cmath import exp

Signature & Overview

cmath.exp(z, /)

Return the exponential value e**z.

Usage

import cmath

# Euler's identity: e^(i*pi) + 1 = 0
assert cmath.isclose(cmath.exp(1j * cmath.pi), -1, abs_tol=1e-12)

Gotchas

REPL Inspect

from cmath import exp
help(exp)

Linked from

Related notes