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 mark.dickinson
Recipients MrJean1, mark.dickinson, rhettinger
Date 2008-05-19.17:56:52
SpamBayes Score 0.00318804
Marked as misclassified No
Message-id <1211219840.86.0.0199962295967.issue2819@psf.upfronthosting.co.za>
In-reply-to
Content
The latest mathmodule patch (file 10371) looks pretty good to me.  I 
haven't looked at the complex version yet.  A few comments:

 - for setting _do_sum_pow_2 I think you should use ldexp instead of pow;  
there's a much greater chance of pow giving inexact results.

 - trying to support FLT_RADIX != 2 seems futile;  for a start, the whole 
algorithm and its proof would need to be reexamined.  Any code specific to 
FLT_RADIX != 2 would be very difficult to test---all of the Python 
buildbots are IEEE 754, for example.  I'm not sure what the best solution 
is:  perhaps math.sum should only be included when FLT_RADIX = 2, or (even 
better) when IEEE 754 is in use.  It shouldn't be too hard to add autoconf 
tests to detect the float format.

 - there are long lines in _do_sum, in violation of PEP 7;  maybe 
factoring out the memory-management code for the partials array would 
help?

 - it would be nice to have some brief comments before each of the _do_sum 
functions indicating its purpose.
History
Date User Action Args
2008-05-19 17:57:27mark.dickinsonsetspambayes_score: 0.00318804 -> 0.00318804
recipients: + mark.dickinson, rhettinger, MrJean1
2008-05-19 17:57:21mark.dickinsonsetspambayes_score: 0.00318804 -> 0.00318804
messageid: <1211219840.86.0.0199962295967.issue2819@psf.upfronthosting.co.za>
2008-05-19 17:57:16mark.dickinsonlinkissue2819 messages
2008-05-19 17:57:06mark.dickinsoncreate