If I read you right, you are saying that if you compute a+b, you'll get a different result than if you compute b+a, if a is tiny and b is huge.
I believe this is incorrect. Feel free to show me a counterexample.
I believe this is incorrect. Feel free to show me a counterexample.
>>> 0.1+0.2+0.3
0.6000000000000001
>>> 0.2+0.3+0.1
0.6
It's an associativity problem and not a commutative one, however, that is relevant to the original point about folding floating point operations over lists.[1] https://www.quora.com/Is-floating-point-addition-commutative...