Python math 模块
Python math.nan 返回一个浮点值 nan(not a number,不是一个数字),这个值不是一个合法数字。
math.nan 相当于 float('nan') 的输出。
语法
math.nan 常量语法如下:
math.nan
返回值
返回一个浮点数 nan。
实例
以下实例返回 nan:
输出结果:
nan <class 'float'>