4 ms·
Sorting and then summing is a commonly used technique. Still, there are also better methods such as Kahan summation: https://en.wikipedia.org/wiki/Kahan_summat
by zmonx 9y ago
Sorting and then summing is a commonly used technique. Still, there are also better methods such as Kahan summation:
https://en.wikipedia.org/wiki/Kahan_summation_algorithm https://en.wikipedia.org/wiki/Kahan_summation_algorithm
Using pairwise addition is a very good alternative with the added benefit that it can be easily parallelized.
Personally, I would gladly use a number format that does not require such special considerations for summing a set of numbers, and still yields good results. I am really looking forward to alternative representations.