[Python-Dev] sum() (original) (raw)

Raymond Hettinger python at rcn.com
Fri Mar 11 19:39:59 CET 2005


[Alex]

If you're considering revisions to sum's design, my suggestion would be to find a way to let the user tell sum to use a more accurate approach when summing floats.

FWIW, when accuracy is an issue, I use:

sum(sorted(data, key=abs))

Raymond



More information about the Python-Dev mailing list