print '{0:.3e}'.format(float(2.23799235765712699))
print '{0:.3e}'.format(float(2.23799235765712699e47675))
gives
2.238e+00
inf
Clearly what I want in the second case is 2.238e+47675.
How can I achieve this?
| 1 | initial version |
print '{0:.3e}'.format(float(2.23799235765712699))
print '{0:.3e}'.format(float(2.23799235765712699e47675))
gives
2.238e+00
inf
Clearly what I want in the second case is 2.238e+47675.
How can I achieve this?
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.