Raymond Hettinger <[EMAIL PROTECTED]> added the comment: The approach of using separate accumulations is intrinsically flawed if you want the same result as a regular sum(). Here's a small dataset that shows why you can't accumulate separate sums by type:
>>> d = [1000000000000000, - 1000000000000000.0, .0000000000000001, .0000000000000001] >>> sum(d) 2e-16 >>> d[0] + sum(d[1:]) 0.0 Closing this one. The approach is doomed and the possible benefits over the current approach are microscopic at best and only apply to unusual corner cases. I also prefer the current approach because it is easily extended to LongLongs and it is easy to show that the code is correct (at least with respect to producing the same result as a regular sum()). ---------- resolution: -> rejected status: open -> closed __________________________________ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2785> __________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com