Python math.nan Constant
Python math.nan Returns the floating-point value nan (not a number), which is not a valid number.
math.nan Equivalent to the output of float('nan').
Syntax
The syntax of the math.nan constant is as follows:
math.nan
Return Value
Returns the floating-point number nan.
Example
The following example returns nan:
Example
Import the math package
import
math
Output nan
(
math
.
nan
)
Output the type of nan
(
type
(
math
.
nan
)
)
Output result:
nan
Python math Module