Python cmath.infj Constant
❮ cmath Methods
Example
Print complex infinity:
#Import cmath Library
import cmath
# Print complex infinity
print (cmath.infj)
Try
it Yourself »
Definition and Usage
The cmath.infj
constant returns a complex positive infinity.
The return has a 0 real part, and positive infinity as the imaginary part.
The cmath.infj constant is equivalent to
complex(0.0, float("inf"))
.
Syntax
Technical Details
Return Value: |
A complex value, representing the value of
complex infinity |
Python Version: |
3.6 |
❮ cmath Methods