Note : I'm not asking why is 0.1 + 0.2 different from 0.3.
According to Is floating point math broken?, 0.1+0.2 does not equal to 0.3, because 0.1 and 0.2 are already rounded to different numbers before comparing, which is different from rounded number from 0.3.
But my question is, why 0.1+0.2+0.3!=0.3+0.2+0.1?
console.log(0.1+0.2+0.3==0.3+0.2+0.1);
My assumption: inside computers, floating numbers would be rounded to a value :
0.1 is round to A
0.2 is round to B
0.3 is round to C
since rounded value is exact (can be represented by binary), so I think
A+B+C should be exactly equals to C+B+A, just like 1+2+3 exactly equals to 3+2+1. But now the result is different. What wrong with my assumption?