python如何表示无穷小

python表示无穷小的方法:
python使用“float('inf')”语句来表示无穷大,那么无穷小就可以用“float('-inf')”来表示
示例如下:
>>> a = float("inf")
>>> b = float("-inf")
>>> a
inf
>>> b
-inf
更多Python知识,请关注:云海天python教程网!!
来源:PY学习网:原文地址:https://www.py.cn/article.html

python表示无穷小的方法:
python使用“float('inf')”语句来表示无穷大,那么无穷小就可以用“float('-inf')”来表示
示例如下:
>>> a = float("inf")
>>> b = float("-inf")
>>> a
inf
>>> b
-inf
更多Python知识,请关注:云海天python教程网!!
来源:PY学习网:原文地址:https://www.py.cn/article.html