3 ms·
For a summation, add the smaller numbers first. Smaller as in 0.0000000000053, not like -5172365126.
by Dwedit 3y ago
For a summation, add the smaller numbers first. Smaller as in 0.0000000000053, not like -5172365126.
- Dban1 3y agohow about small as in ²³⁷
- zokier 3y agoFor summation just go with Kahan summation or some improved variant of it https://en.wikipedia.org/wiki/Kahan_summation_algorithm https://en.wikipedia.org/wiki/Kahan_summation_algorithm
- lifthrasiir 3y agoAnd if you can't remember that, you can use a pairwise summation like (((a+b)+(c+d))+((e+f)+(g+h)))+... which gives a decent error reduction in return.