cmath
The cmath module provides mathematical functions for complex numbers. All the following functions accept and return complex numbers:
Function | Description |
---|---|
acos(x) | Returns the arccosine of x |
acosh(x) | Returns the arc hyperbolic cosine of x |
asin(x) | Returns the arcsine of x |
asinh(x) | Returns the arc hyperbolic sine of x |
atan(x) | Returns the arctangent of x |
atanh(x) | Returns the arc hyperbolic tangent of x |
cos(x) | Returns the cosine of x |
cosh(x) | Returns the hyperbolic cosine of x |
exp(x) | Returns e **x |
log(x [,base]) | Returns the logarithm of x in the given base. If base is omitted, the natural logarithm is computed. |
log10(x) | Returns the base 10 logarithm of x |
sin(x) | Returns the sine of x |
sinh(x) | Returns the hyperbolic sine of x |
sqrt(x) | Returns the square root of x |
tan(x) | Returns ... |
Get Python: Essential Reference, Third Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.