From: Heesob Park Date: 2013-04-25T14:43:13+09:00 Subject: [ruby-core:54573] Re: [ruby-trunk - Bug #8299] Minor error in float parsing 2013/4/25 naruse (Yui NARUSE) : > > Issue #8299 has been updated by naruse (Yui NARUSE). > > > phasis68 (Heesob Park) wrote: >> 2013/4/25 naruse (Yui NARUSE) : >> > Therefore use SSE2 rather than such workaround. >> >> I'm not sure why you think SSE2 can fix this issue. >> >> The ruby_strtod function used in converting string value to double >> value requires double-precision (53-bit) rounding precision but >> mingw32 gcc 4.5.2 have default 64-bit precision which higher than >> other compilers. >> >> So the patch lowers precision from 64 bit to 53 bit. > > double arithmetics with SSE2 is double-precision. > see also gcc's -mfpmath=sse option > http://gcc.gnu.org/onlinedocs/gcc-4.0.0/gcc/i386-and-x86_002d64-Options.html#index-march-959 I agree that SSE2 is the better solution for modern OS and modern compiler. But SSE2 has more restrictions than x87. SSE2 is not supported on the following environment. Microsoft Visual C++ Compiler prior to Visual Studio .NET 2003. AMD CPUs prior to Athlon 64, including all Socket A-based CPUs Intel CPUs prior to Pentium 4