Python math.inf 常量
定義和用法
math.inf
常量返回一個浮點型正無窮大。
對於負無窮大,請使用 -math.inf
。
inf 常量等同於 float('inf')
。
語法
math.inf
技術詳情
返回值 | 一個 float 值,表示正無窮大的值 |
---|---|
Python 版本 | 3.5 |
math.inf
常量返回一個浮點型正無窮大。
對於負無窮大,請使用 -math.inf
。
inf 常量等同於 float('inf')
。
math.inf
返回值 | 一個 float 值,表示正無窮大的值 |
---|---|
Python 版本 | 3.5 |
如果您想將 W3Schools 服務用於教育機構、團隊或企業,請傳送電子郵件給我們
sales@w3schools.com
如果您想報告錯誤,或想提出建議,請傳送電子郵件給我們
help@w3schools.com