This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author skrah
Recipients Keith.Brafford, eric.smith, ezio.melotti, facundobatista, mark.dickinson, rhettinger, serge.stroobandt, skrah, tim.peters, ztane
Date 2016-08-11.09:41:09
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
In-reply-to <>
On Thu, Aug 11, 2016 at 09:17:10AM +0000, Antti Haapala wrote:
> However the *precision* of decimals is meaningless anyhow. Add a very precisely measured '0e0' to any number and the sum also has exponent of 0, and is thus never displayed in exponential notation.

It is not meaningless and actually one of the most important features of decimal:

>>> x = Decimal("3.6")
>>> y = Decimal("0.0000000000000000000000") # number "measured" with ridiculous precision
>>> x.to_eng_string()
>>> (x + y).to_eng_string()

>>> x = Decimal("3.6")
>>> y = Decimal("0e-7") # perhaps more realistic
>>> (x + y).to_eng_string()

If you have confidence in your measurement, you have to let decimal know
by actually spelling it out.
Date User Action Args
2016-08-11 09:41:10skrahsetrecipients: + skrah, tim.peters, rhettinger, facundobatista, mark.dickinson, eric.smith, ezio.melotti, Keith.Brafford, ztane, serge.stroobandt
2016-08-11 09:41:10skrahlinkissue26223 messages
2016-08-11 09:41:09skrahcreate