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