Mark Dickinson <[EMAIL PROTECTED]> added the comment:

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.

__________________________________
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue2819>
__________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to