On this page
cmath.acos
Up: cmath | Next: cmath.acosh
Rel: cmath.acosh, cmath.asin, cmath.asinh, cmath.atan
Ref: docs.python.org — cmath.acos
Tags: #public #python3 #stdlib #cmath
Import
import cmath
from cmath import acos
Signature & Overview
cmath.acos(z, /)
Return the arc cosine of z.
Usage
import cmath
assert cmath.isclose(cmath.acos(1), 0)
assert cmath.acos(2).imag != 0 # real math.acos(2) would raise ValueError
Gotchas
- Always returns
complex, even for real inputs in[-1, 1].
REPL Inspect
from cmath import acos
help(acos)
Linked from
- tuts/python3/stdlib_module/cmath
- tuts/python3/stdlib_module/cmath/acosh
- tuts/python3/stdlib_module/cmath/asin
- tuts/python3/stdlib_module/cmath/asinh
- tuts/python3/stdlib_module/cmath/atan
- tuts/python3/stdlib_module/cmath/atanh
- tuts/python3/stdlib_module/cmath/cos
- tuts/python3/stdlib_module/cmath/cosh
- tuts/python3/stdlib_module/cmath/exp
- tuts/python3/stdlib_module/cmath/isclose
- tuts/python3/stdlib_module/cmath/isfinite
- tuts/python3/stdlib_module/cmath/isinf
- tuts/python3/stdlib_module/cmath/isnan
- tuts/python3/stdlib_module/cmath/log
- tuts/python3/stdlib_module/cmath/log10
- tuts/python3/stdlib_module/cmath/phase
- tuts/python3/stdlib_module/cmath/polar
- tuts/python3/stdlib_module/cmath/rect
- tuts/python3/stdlib_module/cmath/sin
- tuts/python3/stdlib_module/cmath/sinh
- tuts/python3/stdlib_module/cmath/sqrt
- tuts/python3/stdlib_module/cmath/tan
- tuts/python3/stdlib_module/cmath/tanh
Related notes
- tuts/python3/stdlib_module/cmath/acosh Linked here; links to this page; shared tags: #cmath, #stdlib
- tuts/python3/stdlib_module/cmath/asin Linked here; links to this page; shared tags: #cmath, #stdlib
- tuts/python3/stdlib_module/cmath/asinh Linked here; links to this page; shared tags: #cmath, #stdlib
- tuts/python3/stdlib_module/cmath/atan 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/atanh links to this page; shared tags: #cmath, #stdlib
- tuts/python3/stdlib_module/cmath/cos links to this page; shared tags: #cmath, #stdlib
- tuts/python3/stdlib_module/cmath/cosh links to this page; shared tags: #cmath, #stdlib
- tuts/python3/stdlib_module/cmath/exp links to this page; shared tags: #cmath, #stdlib
- tuts/python3/stdlib_module/cmath/isclose links to this page; shared tags: #cmath, #stdlib