Home >>Python cmath Module

Python cmath Module

Python cmath Module

A complex number is created from two real numbers and the return value has an imaginary part of 0. This cmath module has a set of methods and constants.

cMath Methods

Parameter Values

Method Description
cmath.acos(x) This method is used to returns the arc cosine value of x
cmath.acosh(x) It is used to returns the hyperbolic arc cosine of x
cmath.asin(x) It Returns the arc sine of x
cmath.asinh(x) It is used to returns the hyperbolic arc sine of x
cmath.atan(x) This method is used to returns the arc tangent value of x
cmath.atanh(x) It is used to returns the hyperbolic arctangent value of number
cmath.cos(x) This method is used to returns the cosine of x
cmath.cosh(x) This method is used to returns the hyperbolic cosine of x
cmath.exp(x) This method is used to returns the value of Ex, where E is the Euler's number
cmath.isclose() It is used to checks whether two values are close, or not
cmath.isfinite(x) It is used to checks whether x is a finite number
cmath.isinf(x) This method is used to checks whether x is a positive or negative infinity
cmath.isnan(x) This method is used to checks whether x is NaN (not a number)
cmath.log(x[, base]) It is used to returns the logarithm of x to the base
cmath.log10(x) This method is used to returns the base-10 logarithm of x
cmath.phase() It is used to return the phase of a complex number
cmath.polar() This method is used to convert a complex number to polar coordinates
cmath.rect() This method is used to convert polar coordinates to rectangular form
cmath.sin(x) It is used to returns the sine of x
cmath.sinh(x) It is used to returns the hyperbolic sine of x
cmath.sqrt(x) This method Returns the square root
cmath.tan(x) It is used to returns the tangent of x
cmath.tanh(x) It is used to returns the hyperbolic tangent of x

cMath Constants

Constant Description
cmath.e This constant rteurns Euler's number
cmath.inf It is used to returns a floating-point positive infinity value
cmath.infj It is used to returns a complex infinity value
cmath.nan It is used to returns floating-point NaN (Not a Number) value
cmath.nanj This method returns coplext NaN (Not a Number) value
cmath.pi This method returns PI (3.1415...)
cmath.tau It is used to returns tau (6.2831...)

Python cmath Module Index

Sr.No. Topics
1 Python cmath.acos() Method
2 Python cmath.acosh() Method
3 Python cmath.asin() Method
4 Python cmath.asinh() Method
5 Python cmath.atan() Method
6 Python cmath.atanh() Method
7 Python cmath.cos() Method
8 Python cmath.cosh() Method
9 Python cmath.exp() Method
10 Python cmath.isclose() Method
11 Python cmath.isfinite() Method
12 Python cmath.isinf() Method
13 Python cmath.isnan() Method
14 Python cmath.log() Method
15 Python cmath.log10() Method
16 Python cmath.phase() Method
17 Python cmath.polar() Method
18 Python cmath.rect() Method
19 Python cmath.sin() Method
20 Python cmath.sinh() Method
21 Python cmath.sqrt() Method
22 Python cmath.tan() Method
23 Python cmath.tanh() Method
24 Python cmath.e Constant
25 Python cmath.inf Constant
26 Python cmath.infj Constant
27 Python cmath.nan Constant
28 Python cmath.nanj Constant
29 Python cmath.pi Constant
30 Python cmath.tau Constant

No Sidebar ads