Python/ref math inf
来自菜鸟教程
<languages />
Python math.inf常数
例
打印正负无穷大:
# Import math Library
import math
# Print the positive infinity
print (math.inf)
# Print the negative infinity
print (-math.inf)
定义和用法
The
math.inf
常数返回浮点正无穷大。
对于负无穷大,请使用
-math.inf
.
inf常数等于
float('inf')
.
句法
math.inf
技术细节
| 返回值: | A
|
| Python版本: | 3.5 |