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-15.05:03:13
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <[email protected]>
In-reply-to
Content
Cute: for any number of arguments, try computing h**2, then one at a time subtract a**2 (an argument squared) in descending order of magnitude.  Call that (h**2 - a1**2 - a2**2 - ...) x.

Then

    h -= x/(2*h)

That should reduce errors too, although not nearly so effectively, since it's a cheap way of estimating (& correcting for) the discrepancy between sum(a**2) and h**2.

Note that "descending order" is important: it's trying to cancel as many leading bits as possible as early as possible, so that lower-order bits come into play.

Then again ... why bother? ;-)
History
Date User Action Args
2020-08-15 05:03:13tim.peterssetrecipients: + tim.peters, rhettinger, mark.dickinson, serhiy.storchaka
2020-08-15 05:03:13tim.peterssetmessageid: <[email protected]>
2020-08-15 05:03:13tim.peterslinkissue41513 messages
2020-08-15 05:03:13tim.peterscreate