Python – cmath.nanj Constant
Last Updated :
01 Jun, 2020
cMath module contains a number of functions which is used for mathematical operations for complex numbers. The cmath.nanj Constant is used to get the complex nan (Not a Number).
Syntax: cmath.nanj
Returns: Return the complex nan value.
Below examples illustrate the use of above function:
Example #1 :
Python3
import cmath
val = cmath.nanj
print (val)
|
Output:
nanj
Example #2:
Python3
import cmath
val = type (cmath.nanj)
print (val)
|
Output:
<class 'complex'>
Share your thoughts in the comments
Please Login to comment...