python中浮点数末尾的后缀e+number是什么意思? [英] What does the suffix e+number mean in python at the end of a float?
本文介绍了python中浮点数末尾的后缀e+number是什么意思?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我使用 random.uniform(1,2**100)
生成范围 (0,2**100)
的随机浮点数.一些结果是:
我无法在每个数字的末尾获得 e+29
的解释.
解决方案
它被称为 E notation,它是科学符号的纯文本表示.
1.234e+56
表示 1.234 * 10**56
或更易读的形式 1.234 × 1056.
I use random.uniform(1,2**100)
to produce random floats to the range (0,2**100)
. Some results are :
>>> random.uniform(1,2**100)
5.9798650563331964e+29
>>> random.uniform(1,2**100)
8.439133849811236e+29
>>> random.uniform(1,2**100)
1.1367823572756921e+30
>>> random.uniform(1,2**100)
6.467828850316163e+29
>>> random.uniform(1,2**100)
6.114089228136624e+29
>>> random.uniform(1,2**100)
5.8262139039159224e+29
I can't get the interpretation of e+29
at the end of each number.
解决方案
It's know as E notation, which is plain text representation of scientific notation.
1.234e+56
means 1.234 * 10**56
or in more human readable form 1.234 × 1056.
这篇关于python中浮点数末尾的后缀e+number是什么意思?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文