Jens Bloch Helmers <[EMAIL PROTECTED]> writes:
> How can I control the number of digits in the exponent when writing
> floats to a file? It seems that Python2.4.2(winXP) prints three
> digits anyway.
>
> >>> print 1.0e50
> 1e+050
That's weird; must be version and/or OS dependent. On Fedora Core
'%.4e' % 1.0e50
--
http://mail.python.org/mailman/listinfo/python-list
How can I control the number of digits in the exponent when writing
floats to a file? It seems that Python2.4.2(winXP) prints three digits anyway.
>>> print 1.0e50
1e+050
>>> print '%e' % (1.0e50)
1e+050
I would prefer two digits in the exponent. Usually 3 digits is not a
problem, except for wais