简体   繁体   English

Python中的科学计数法

[英]Scientific notation in python

Hi I know that to print a number in a scientific notation I can do the following 嗨,我知道要以科学计数法打印数字,我可以执行以下操作

"%.3e" % 123.456

will give 会给

1.234e+02

however how can I obtain 但是我如何获得

12.34e+01?

For clarification, most usages of Scientific Notation refers to Normalized Notation which requires that the leading number be at least 1 but less than 10. In Engineering Notation , the exponent is a multiple of three. 为了澄清起见, 科学计数法的大多数用法是指标准化计数法 ,它要求前导数字至少为1但小于10。在工程计数法中 ,指数是3的倍数。 These are the two most commonly used versions of Scientific Notation. 这是科学计数法的两个最常用的版本。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM