------- Comment #1 from vincent at vinc17 dot org 2008-06-19 14:37 ------- To make things clear, perhaps I should have added:
#if __STDC__ == 1 && __STDC_VERSION__ >= 199901 && defined(__STDC_IEC_559__) #pragma STDC FP_CONTRACT OFF printf ("__STDC_IEC_559__ defined:\n" "The implementation shall conform to the IEEE-754 standard.\n" "FLT_EVAL_METHOD is %d (see ISO/IEC 9899, 5.2.4.2.2#7).\n\n", (int) FLT_EVAL_METHOD); #endif which outputs: __STDC_IEC_559__ defined: The implementation shall conform to the IEEE-754 standard. FLT_EVAL_METHOD is 0 (see ISO/IEC 9899, 5.2.4.2.2#7). So, one can't even say that the value of d is correct because it is the same as the exact result rounded to double precision. The fact that the double rounding doesn't occur is a bug here. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36578