Home >>Python cmath Module >Python cmath.isfinite() Method
Python cmath.isfinite() method in python is used to return a Boolean value (true or false) and checks whether a given complex value is finite, or not.If the value is finite returns true, otherwise False.
Syntax:cmath.isfinite(x)
Parameter | Description |
---|---|
x | It is a Required parameter to check the value if it is finite or not |
import cmath
print (cmath.isfinite(4 + 2j))
print (cmath.isfinite(complex(3.0,float('inf'))))
print (cmath.isfinite(float('inf')+ 3j))
import cmath
print (cmath.isfinite(5 + 2j))
print (cmath.isfinite(complex(5.0,float('inf'))))
print (cmath.isfinite(float('inf')+ 5j))