As described here: https://en.wikipedia.org/wiki/Kahan_summation_algorithm
- there is several ways to reduce accumulation of round errors during make SUM operation.
Consider script from attach and its results.
There is only one test case (column "test_no" = 1) which contains proper values in all thee columns: SUM() as it is implemented now, Neumaier and Klein-Kahan totalling. But these values has exponenta less than 34.
All other test cases contain at least one wrong result.
The best accuracy is demonstrated by Klein-Kahan algorithm, but is also has one flaw: example where test_no = 5 (proper results there must be exactly 0).
It will be useful to have alternate implementation for SUM() ( say, "SUM2()" ?) which will use some of algorithm with compensation of running totals.