Index: get_d.c =================================================================== RCS file: /users/spaces/logiciels/mpfr/cvs/msb/get_d.c,v retrieving revision 1.11 retrieving revision 1.12 diff -c -r1.11 -r1.12 *** get_d.c 2002/04/15 13:26:38 1.11 --- get_d.c 2002/04/20 13:17:37 1.12 *************** *** 116,128 **** subnormal is 2^(-1074)=0.1e-1073 */ if (e < -1073) { d = negative ? (rnd_mode == GMP_RNDD || (rnd_mode == GMP_RNDN && mpfr_cmp_si_2exp(src, -1, -1075) < 0) ! ? -DBL_MIN * DBL_EPSILON : -0.0) : (rnd_mode == GMP_RNDU || (rnd_mode == GMP_RNDN && mpfr_cmp_si_2exp(src, 1, -1075) > 0) ! ? DBL_MIN * DBL_EPSILON : 0.0); } /* the largest normalized number is 2^1024*(1-2^(-53))=0.111...111e1024 */ else if (e > 1024) --- 116,133 ---- subnormal is 2^(-1074)=0.1e-1073 */ if (e < -1073) { + /* Note: Avoid using a constant expression DBL_MIN * DBL_EPSILON + as this gives 0 instead of the correct result with gcc on some + Alpha machines. */ d = negative ? (rnd_mode == GMP_RNDD || (rnd_mode == GMP_RNDN && mpfr_cmp_si_2exp(src, -1, -1075) < 0) ! ? -DBL_MIN : -0.0) : (rnd_mode == GMP_RNDU || (rnd_mode == GMP_RNDN && mpfr_cmp_si_2exp(src, 1, -1075) > 0) ! ? DBL_MIN : 0.0); ! if (d != 0.0) ! d *= DBL_EPSILON; } /* the largest normalized number is 2^1024*(1-2^(-53))=0.111...111e1024 */ else if (e > 1024)