Mark Dickinson <[EMAIL PROTECTED]> added the comment: Okay, just to show it's possible:
Here (msum4.py) is a modified version of Raymond's recipe that deals correctly with: (1) intermediate overflows (2) special values (infs and nans) in the input, and (3) always gives correctly rounded results. The file contains more tests, and a proof of correctness. The algorithm still makes only a single pass through the given iterable, and there should be minimal slowdown in the common case. It's still only 60-70 lines of Python code, so I don't think it would be unreasonable to aim to include these modifications in the C version. Added file: http://bugs.python.org/file10357/msum4.py __________________________________ 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