[Python-Dev] sum() (original) (raw)
Raymond Hettinger python at rcn.com
Fri Mar 11 19:39:59 CET 2005
- Previous message: [Python-Dev] Adding any() and all()
- Next message: [Python-Dev] sum()
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
[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
- Previous message: [Python-Dev] Adding any() and all()
- Next message: [Python-Dev] sum()
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]