This is a good thing to be aware of.Also the "field" of floating point numbers is not commutative†, (can run on JS console:)x=0;for (let i=0; i<10000; i++) { x+=0.0000000000000000001; }; x+=1--> 1.000000000000001x=1;for (let i=0; i<10000; i++) { x+=0.0000000000000000001; };--> 1Although most of the time a+b===b+a can be relied on. And for most of the stuff we do on the web it's fine!††† edit: Please s/commutative/associative/, thanks for the comments below.†† edit: that's wrong! Replace with (a+b)+c === a+(b+c)

 Note that the addition is commutative [1], i.e. a+b==b+a always.What is failing is associativity, i.e. (a+b)+c==a+(b+c)For example(.0000000000000001 + .0000000000000001 ) + 1.0--> 1.0000000000000002.0000000000000001 + (.0000000000000001 + 1.0)--> 1.0In your example, you are mixing both properties,(.0000000000000001 + .0000000000000001) + 1.0--> 1.0000000000000002(1.0 + .0000000000000001) + .0000000000000001--> 1.0but the difference is caused by the lack of associativity, not by the lack of commutativity.[1] Perhaps you must exclude -0.0. I think it is commutative even with -0.0, but I'm never 100% sure.
 > Also the "field" of floating point numbers is not commutative, (can run on JS console:)OK.`````` >> x = 0; 0 >> for (let i=0; i<10000; i++) { x+=0.0000000000000000001; }; 1.0000000000000924e-15 >> x + 1 1.000000000000001 >> 1 + x 1.000000000000001 `````` You've identified a problem, but it isn't that addition is noncommutative.