cmath – mathematical functions for complex numbers
This module implements a subset of the corresponding CPython module, as described below. For more information, please refer to the original CPython documentation: cmath.
The cmath
module provides some basic mathematical functions for dealing with complex numbers.
1. Function#
1.1. cos#
Returns the cosine of z
.
1.2. exp#
Returns the exponent of z
.
1.3. log#
Returns the natural logarithm of z
. The branch cuts along the negative real axis.
1.4. log10#
Returns the base 10 logarithm of z
. The branch cuts along the negative real axis.
1.5. phase#
Returns the phase, range (-pi, +pi) of the number "z".
1.6. polar#
Return the polar form of z
as a tuple.
1.7. rect#
Returns the complex number of the modulus r
and the phase phi
.
1.8. sin#
Returns the sine of z
.
1.9. sqrt#
Returns the square root of z
.
2. Constants#
2.1. cmath.e#
The basis of natural logarithm
2.2. cmath.pi#
Ratio of circumference to diameter
Related Issues not found
Please login GitHub to create issue