The cmath
module provides some basic mathematical functions for working with complex numbers. Floating point support required for this module.
Return the cosine of z
.
Return the exponential of z
.
Return the natural logarithm of z
. The branch cut is along the negative real axis.
Return the base-10 logarithm of z
. The branch cut is along the negative real axis.
Returns the phase of the number z
, in the range (-pi, +pi).
Returns, as a tuple, the polar form of z
.
Returns the complex number with modulus r
and phase phi
.
Return the sine of z
.
Return the square-root of z
.
cmath.e
: Base of the natural logarithmcmath.pi
: The ratio of a circle’s circumference to its diameter