cmath — mathematical functions for complex numbers#
The cmath module provides basic mathematical functions for working with complex numbers, including trigonometric, exponential, logarithmic, and conversions between rectangular (real, imag) and polar (r, phi) representations.
Functions#
- cmath.log(z: complex) complex#
Return the natural logarithm of
z. The branch cut is along the negative real axis.