【发布时间】:2023-11-03 14:50:01
【问题描述】:
如何将科学记数法转换为浮点数? 这是我要避免的示例:
Python 2.7.3 (default, Apr 14 2012, 08:58:41) [GCC] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> a=[78.40816326530613, 245068094.16326532]
>>> print a[0]/a[1]
3.19944395589e-07
>>> print float(a[0]/a[1])
3.19944395589e-07
>>> print float(a[0])/float(a[1])
3.19944395589e-07
【问题讨论】:
标签: python scientific-notation floating-point-conversion