On this page
cmath.cos
Prev: cmath.atanh | Up: cmath | Next: cmath.cosh
Rel: cmath.acos, cmath.acosh, cmath.asin, cmath.asinh
Ref: docs.python.org — cmath.cos
Tags: #public #python3 #stdlib #cmath
Import
import cmath
from cmath import cos
Signature & Overview
cmath.cos(z, /)
Return the cosine of z.
Usage
import cmath
assert cmath.isclose(cmath.cos(0), 1)
assert cmath.isclose(cmath.cos(1j), cmath.cosh(1))
Gotchas
- Unbounded on the complex plane: Unlike real
math.cos,|cmath.cos(z)|grows exponentially with|z.imag|.
REPL Inspect
from cmath import cos
help(cos)
Linked from
Related notes
- tuts/python3/stdlib_module/cmath/atanh Linked here; links to this page; shared tags: #cmath, #stdlib
- tuts/python3/stdlib_module/cmath/cosh Linked here; links to this page; shared tags: #cmath, #stdlib
- tuts/python3/stdlib_module/cmath Linked here; links to this page; shared tags: #stdlib
- tuts/python3/stdlib_module/cmath/acos Linked here; shared tags: #cmath, #stdlib
- tuts/python3/stdlib_module/cmath/acosh Linked here; shared tags: #cmath, #stdlib
- tuts/python3/stdlib_module/cmath/asin Linked here; shared tags: #cmath, #stdlib
- tuts/python3/stdlib_module/cmath/asinh Linked here; shared tags: #cmath, #stdlib
- tuts/python3/stdlib_module/cmath/atan shared tags: #cmath, #stdlib
- tuts/python3/stdlib_module/cmath/exp shared tags: #cmath, #stdlib
- tuts/python3/stdlib_module/cmath/isclose shared tags: #cmath, #stdlib