1000字范文,内容丰富有趣,学习的好帮手!
1000字范文 > python中数字应该用什么表示 python中可以表示的最小数字是多少?

python中数字应该用什么表示 python中可以表示的最小数字是多少?

时间:2022-10-03 13:27:31

相关推荐

python中数字应该用什么表示 python中可以表示的最小数字是多少?

What is the smallest number which can be represented in python?

I have seen as small as 2.05623357236e-296 but can there be any smaller?

解决方案>>> import sys

>>> sys.float_info

sys.float_info(max=1.7976931348623157e+308, max_exp=1024, max_10_exp=308, min=2.225073858507e-308, min_exp=-1021, min_10_exp=-307, dig=15, mant_dig=53, epsilon=2.220446049250313e-16, radix=2, rounds=1)

From the docs

min DBL_MIN minimum positive normalized float

min_exp DBL_MIN_EXP minimum integer e such that radix**(e-1) is a normalized float

On my system it is mentioned as min=2.225073858507e-308

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。