cMath module contains a number of functions which is used for mathematical operations for complex numbers. The cmath.infj Constant is used to get the complex positive infinity.
Syntax: cmath.infj
Returns: Return the complex positive infinity.
Below examples illustrate the use of above function:
Example :
Python3
# Python code to implement # the cmath.infj constant # importing "cmath" # for mathematical operations import cmath
# Print complex infinity val = cmath.infj
print (val)
|
Output:
infj
Example 2:
Python3
# Python code to implement # the cmath.infj constant # importing "cmath" # for mathematical operations import cmath
# Print complex infinity val = complex (cmath.infj)
print (val)
|
Output:
infj