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 MrJean1
Recipients MrJean1
Date 2008-05-08.19:53:12
SpamBayes Score 0.02521772
Marked as misclassified No
Message-id <1210276400.51.0.762850955818.issue2792@psf.upfronthosting.co.za>
In-reply-to
Content
Here is one more, final attempt to improve fast summation, somewhat.

This version inspects the type of both the sum and the first item and 
adds all ints and floats without any PyNumber_Add() call and in order.

Also, the results for this test case are compatible:

>>> d = [1000000000000000, -1000000000000000.0, .0000000000000001, 
.0000000000000001]
>>> sum(d)
2e-16
>>> d[0] + sum(d[1:])
0.0

/Jean Brouwers
History
Date User Action Args
2008-05-08 19:53:21MrJean1setspambayes_score: 0.0252177 -> 0.02521772
recipients: + MrJean1
2008-05-08 19:53:20MrJean1setspambayes_score: 0.0252177 -> 0.0252177
messageid: <1210276400.51.0.762850955818.issue2792@psf.upfronthosting.co.za>
2008-05-08 19:53:18MrJean1linkissue2792 messages
2008-05-08 19:53:18MrJean1create