Steven D'Aprano added the comment: On 12/08/13 19:21, Mark Dickinson wrote:
> About the implementation of sum: it's worth noting that the algorithm you're > using for floats depends on correct rounding of addition and subtraction, and > that that's not guaranteed. [...] > Steven: any thoughts about how to deal with this? Options are (1) just > ignore the problem and hope no-one runs into it, (2) document it / warn about > it, (3) try to fix it. Fixing it would be reasonably easy for a C > implementation (with access to the FPU control word, in the same way that our > float<->string conversion already does), but not so easy in Python without > switching algorithm altogether. Document it and hope :-) add_partial is no longer documented as a public function, so I'm open to switching algorithms in the future. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue18606> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com