[英]Out put format should be according to scientific notation
In my program I am calculating large number of values and I want to write the calculated values according to scientific notation as an example it should be as follow. 在我的程序中,我正在计算大量值,并且我想根据科学计数法写出计算值,例如,它应如下所示。
0.16200000000 should be 1.6200000000e-01
6.09756097560 should be 6.0975609756e+00
Which function results this out put. 哪个函数可以输出结果。
'%e' % (number)
The %e format specifier is the specifier for scientific notations. %e格式说明符是科学计数法的说明符。 Find out more here: https://docs.python.org/2/library/string.html
在此处了解更多信息: https : //docs.python.org/2/library/string.html
'%.10e' % (your value) '%.10e'%(您的值)
This is the easiest way to convert in to scientific notation. 这是转换为科学计数法的最简单方法。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.