ruby-changes:28352
From: naruse <ko1@a...>
Date: Mon, 22 Apr 2013 11:59:21 +0900 (JST)
Subject: [ruby-changes:28352] naruse:r40404 (trunk): * util.c (ruby_hdtoa): revert r29729.
naruse 2013-04-22 11:59:09 +0900 (Mon, 22 Apr 2013) New Revision: 40404 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=40404 Log: * 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. Modified files: trunk/ChangeLog trunk/util.c Index: ChangeLog =================================================================== --- ChangeLog (revision 40403) +++ ChangeLog (revision 40404) @@ -1,3 +1,9 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Mon Apr 22 10:25:21 2013 NARUSE, Yui <naruse@r...> + + * 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@c...> * configure.in: Revert using sigsetjmp by default due to performance Index: util.c =================================================================== --- util.c (revision 40403) +++ util.c (revision 40404) @@ -3878,13 +3878,10 @@ ruby_hdtoa(double d, const char *xdigs, https://github.com/ruby/ruby/blob/trunk/util.c#L3878 /* 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; } -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/