
Floating point math: Why doesn't GCC optimize a*a*a*a*a*a to (a*a*a)*(a*a*a)? - laumars
https://stackoverflow.com/questions/6430448/why-doesnt-gcc-optimize-aaaaaa-to-aaaaaa
======
drallison
Because the two product expressions compute different results for some values
of a. Floating point values are not real numbers. Many apparently obvious
equivalences are not. Welcome to the wonderful world of floating point
computations.

~~~
laumars
That much I'd expect most developers to be reasonably familiar with but the SO
link I submitted goes into a lot more detail about what the compiler does with
floating point operations which is why I thought it was worth a share.

