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 oscarbenjamin, skrah, steven.daprano, wolma
Date 2014-02-07.12:04:48
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1391774688.74.0.496101236342.issue20499@psf.upfronthosting.co.za>
In-reply-to
Content
We can add a fast Decimal.as_integer_ratio() in C.

That said, why is the sum of Decimals not done in decimal arithmetic
with a very high context precision? It would be exact and with usual exponents in the range [-384, 383] it should be very fast.

>>> c.prec = 50                              
>>> sum([D("1e50"), D(1), D("-1e50")] * 1000)
Decimal('0E+1')
>>> 
>>> c.prec = 51
>>> sum([D("1e50"), D(1), D("-1e50")] * 1000)
Decimal('1000')
History
Date User Action Args
2014-02-07 12:04:48skrahsetrecipients: + skrah, steven.daprano, oscarbenjamin, wolma
2014-02-07 12:04:48skrahsetmessageid: <1391774688.74.0.496101236342.issue20499@psf.upfronthosting.co.za>
2014-02-07 12:04:48skrahlinkissue20499 messages
2014-02-07 12:04:48skrahcreate