The cmath module provides some basic mathematical functions for working with complex numbers. Floating point support is required for this module.
cmath
Return the cosine of z.
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.
Return the phase of the number z, in the range (-pi, +pi).
Return, as a tuple, the polar form of z.
Return the complex number with modulus r and phase phi.
r
phi
Return the sine of z.
Return the square-root of z.
cmath.e
cmath.pi