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 tim.peters
Recipients mark.dickinson, rhettinger, serhiy.storchaka, tim.peters
Date 2020-08-18.18:29:15
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1597775356.44.0.870034861754.issue41513@roundup.psfhosted.org>
In-reply-to
Content
About speed, the fsum() version I posted ran about twice as fast as the all-Decimal approach, but the add_on() version runs a little slower than all-Decimal. I assume that's because fsum() is coded in C while the add_on() prototype makes mounds of additional Python-level function calls. Using released Windows 3.8.5 CPython and on argument vectors of length 50.

Is it worth it? Up to you ;-) There are good arguments to be made in favor of increased accuracy, and in favor of speed.

About "correctly rounded", such a claim can only be justified by proof, not by testing (unless testing exhaustively covers the entire space of inputs). Short of that, best you can claim is stuff like "max error < 0.51 ulp" (or whatever other bound can be proved).
History
Date User Action Args
2020-08-18 18:29:16tim.peterssetrecipients: + tim.peters, rhettinger, mark.dickinson, serhiy.storchaka
2020-08-18 18:29:16tim.peterssetmessageid: <1597775356.44.0.870034861754.issue41513@roundup.psfhosted.org>
2020-08-18 18:29:16tim.peterslinkissue41513 messages
2020-08-18 18:29:15tim.peterscreate