4 ms·
A more general way to do that is Kahan summation[1], where you keep track of the rounding errors made so far. [1]: https://en.wikipedia.org/wiki/Kahan_summatio
by magicalhippo 8y ago
A more general way to do that is Kahan summation[1], where you keep track of the rounding errors made so far.
[1]: https://en.wikipedia.org/wiki/Kahan_summation_algorithm https://en.wikipedia.org/wiki/Kahan_summation_algorithm