GCC optimized code gives strange floating point results
I met William Kahan about 15 years ago and asked him about this.  His response: &quot;If your program says <i>double</i> then yes, of course it&#x27;s a bug if the compiler does long-double precision arithmetic instead.  Isn&#x27;t that obvious?  Why are you even asking this?&quot;<p>If the author of the IEEE 754 standard says that the way you do floating-point arithmetic is obviously a bug, you&#x27;re probably doing it wrong.