[英]Best way to convert from scientific notation to decimal?
I need to convert 我需要转换
-5.168070885485833e+19
To one contiguous integer, I've tried type casting it to long and that doesn't seem to work. 对于一个连续的整数,我尝试过将其强制转换为long类型,但这似乎不起作用。
Use print '%li'%(-5.16807088549e+19)
. 使用
print '%li'%(-5.16807088549e+19)
。 It will print -51680708854899998720
which is close. 它将打印关闭的
-51680708854899998720
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.