[Python-ideas] Numerical instability was: Re: Introduce collections.Reiterable

Tim Peters tim.peters at gmail.com
Fri Sep 20 22:25:07 CEST 2013

[Terry Reedy]
> ...
> If I were trying to improve the incremental variance algorithm, I would
> study the fsum method until a really understood it and then see if I could
> apply the same ideas.

There are a number of ways to do floating "as if with infinite
precision" addition, implemented in pure Python, here:


Not saying they're applicable here, just saying that if anyone wants
to fully understand this, it's a lot easier to read Python code ;-)
`msum` there is closest to Python's math.fsum().

More information about the Python-ideas mailing list