2 comments

[ 2.3 ms ] story [ 11.7 ms ] thread
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.
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.