diff --git a/ChangeLog b/ChangeLog index f0fe7f37a5..bdc3851f2d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Mon Apr 22 10:25:21 2013 NARUSE, Yui + + * util.c (ruby_hdtoa): revert r29729. + If you want ruby to behave as before on x86, specify to use SSE like + -msse2 -mfpmath=sse for gcc. + Sun Apr 21 23:19:00 2013 Charlie Somerville * configure.in: Revert using sigsetjmp by default due to performance diff --git a/util.c b/util.c index 733045daa4..fb72931ed5 100644 --- a/util.c +++ b/util.c @@ -3878,13 +3878,10 @@ ruby_hdtoa(double d, const char *xdigs, int ndigits, int *decpt, int *sign, /* Round to the desired number of digits. */ if (SIGFIGS > ndigits && ndigits > 0) { float redux = 1.0f; - volatile double d; int offset = 4 * ndigits + DBL_MAX_EXP - 4 - DBL_MANT_DIG; dexp_set(u, offset); - d = u.d; - d += redux; - d -= redux; - u.d = d; + u.d += redux; + u.d -= redux; *decpt += dexp_get(u) - offset; }