3 ms·
Because the two product expressions compute different results for some values of a. Floating point values are not real numbers. Many apparently obvious equiva
by drallison 9y ago
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 9y agoThat 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.