summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--util.c7
2 files changed, 8 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index f0fe7f3..bdc3851 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Mon Apr 22 10:25:21 2013 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * 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 <charlie@charliesomerville.com>
* configure.in: Revert using sigsetjmp by default due to performance
diff --git a/util.c b/util.c
index 733045d..fb72931 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;
}