2 ms·
> and that float operations are not commutative. At the end of the day, 0.1 + 0.2 != 0.3 is a fact you have to live with. Addition and multiplication of floati
by aleph_minus_one 3y ago
> and that float operations are not commutative. At the end of the day, 0.1 + 0.2 != 0.3 is a fact you have to live with.
Addition and multiplication of floating point numbers is commutative (sole theoretical exception: there principally exist multiple representations of NaNs, even though in practice processors do not make use of this freedom, i.e. in practice these floating point operations are completely commutative).
- Tainnor 3y agoYes, but not associative. I guess this is what GP was trying to say (and which actually can cause issues).