我使用random.uniform(1,2**100)
生成范围为(0,2**100)
的随机浮点数。一些结果是:
>>> 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
我无法在每个数字的末尾得到e+29
的解释。
“e+数字”是指正数的幂的10,如果是负数,则类似于“e-数字”。
它被称为E notation,是scientific notation的纯文本表示。
1.234e+56
是指1.234 * 10**56
或更具人类可读性的形式1.234×1056。相关问题 更多 >
编程相关推荐