简体   繁体   中英

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. These are the two most commonly used versions of Scientific Notation.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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