[#53944] [ruby-trunk - Bug #8210][Open] Multibyte character interfering with end-line character within a regex — "sawa (Tsuyoshi Sawada)" <sawadatsuyoshi@...>

14 messages 2013/04/03

[#53974] [ruby-trunk - Feature #8215][Open] Support accessing Fiber-locals and backtraces for a Fiber — "halorgium (Tim Carey-Smith)" <ruby-lang-bugs@...>

14 messages 2013/04/03

[#54095] [ruby-trunk - Feature #8237][Open] Logical method chaining via inferred receiver — "wardrop (Tom Wardrop)" <tom@...>

34 messages 2013/04/08

[#54138] [ruby-trunk - Bug #8241][Open] If uri host-part has underscore ( '_' ), 'URI#parse' raise 'URI::InvalidURIError' — "neocoin (Sangmin Ryu)" <neocoin@...>

9 messages 2013/04/09

[#54185] [CommonRuby - Feature #8257][Open] Exception#cause to carry originating exception along with new one — "headius (Charles Nutter)" <headius@...>

43 messages 2013/04/11

[#54196] Encouraging use of CommonRuby — Charles Oliver Nutter <headius@...>

I think we need to do more to encourage the use of the CommonRuby

20 messages 2013/04/11
[#54200] Re: Encouraging use of CommonRuby — Marc-Andre Lafortune <ruby-core-mailing-list@...> 2013/04/11

Hi,

[#54211] Re: Encouraging use of CommonRuby — "NARUSE, Yui" <naruse@...> 2013/04/12

As far as I understand, what is CommonRuby and the process over CommonRuby

[#54207] [CommonRuby - Feature #8258][Open] Dir#escape_glob — "steveklabnik (Steve Klabnik)" <steve@...>

15 messages 2013/04/12

[#54218] [CommonRuby - Feature #8259][Open] Atomic attributes accessors — "funny_falcon (Yura Sokolov)" <funny.falcon@...>

43 messages 2013/04/12

[#54288] [CommonRuby - Feature #8271][Open] Proposal for moving to a more visible, formal process for feature requests — "headius (Charles Nutter)" <headius@...>

15 messages 2013/04/15

[#54333] Requesting Commit Access — Aman Gupta <[email protected]>

Hello ruby-core,

16 messages 2013/04/16

[#54473] [Backport 200 - Backport #8299][Open] Minor error in float parsing — "bobjalex (Bob Alexander)" <bobjalex@...>

27 messages 2013/04/19

[#54532] [ruby-trunk - Bug #8315][Open] mkmf does not include include paths from pkg_config anymore — "Hanmac (Hans Mackowiak)" <hanmac@...>

11 messages 2013/04/23

[#54621] [ruby-trunk - Feature #8339][Open] Introducing Geneartional Garbage Collection for CRuby/MRI — "ko1 (Koichi Sasada)" <redmine@...>

43 messages 2013/04/27
[#54643] [ruby-trunk - Feature #8339] Introducing Geneartional Garbage Collection for CRuby/MRI — "authorNari (Narihiro Nakamura)" <authorNari@...> 2013/04/28

[#54649] Re: [ruby-trunk - Feature #8339] Introducing Geneartional Garbage Collection for CRuby/MRI — SASADA Koichi <ko1@...> 2013/04/28

(2013/04/28 9:23), authorNari (Narihiro Nakamura) wrote:

[#54657] Re: [ruby-trunk - Feature #8339][Open] Introducing Geneartional Garbage Collection for CRuby/MRI — Magnus Holm <judofyr@...> 2013/04/28

On Sat, Apr 27, 2013 at 8:19 PM, ko1 (Koichi Sasada)

[#54665] [ruby-trunk - Bug #8344][Open] Status of Psych and Syck — "Eregon (Benoit Daloze)" <redmine@...>

18 messages 2013/04/28

[ruby-core:54572] Re: [ruby-trunk - Bug #8299] Minor error in float parsing

From: Heesob Park <phasis@...>
Date: 2013-04-25 05:41:51 UTC
List: ruby-core #54572
2013/4/25 David MacMahon <[email protected]>:
>
> On Apr 24, 2013, at 7:03 PM, Heesob Park wrote:
>
>> 2013/4/25 David MacMahon <[email protected]>
>>>
>>> Nice work tracking this down!
>>>
>>> I don't understand how it fixes the compiler specific aspect of the
>>> problem you found where gcc 4.5.2 on MinGW had the problem but gcc 4.7.=
2 on
>>> MinGW did not.  Does gcc 4.7.2 on MinGW already automatically do whatev=
er
>>> "_control87(_PC_53, _MCW_PC)" does, but gcc 4,5,2 on MinGW does not
>>> automatically do it so it needs to be done explicitly?
>>>
>> The console application built with mingw32 compiler  calls _fpreset
>> funciton at startup.
>> The _fpreset function is defined in MSVCRT.dll which set FP default
>> precision to 53 bit mantissa.
>>
>> But in mingwrt-3.18 library which bundled in mingw32 4.7.2 redefined
>> _fpreset function to change FP default precision from 53 to 64-bit
>> mantissa.
>> Actually, the "_control87(_PC_53, _MCW_PC)" means lowering precision
>> from 64 to 53-bit mantissa.
>
> Thanks for the information, but I'm still confused.  The above sounds lik=
e gcc 4.7.2 uses a higher precision (64 bit mantissa) than strtod expects (=
53 bit mantissa), yet in an earlier message you wrote:

The higher precision produce the undesired result in the magic number
(-1.1505945E-5).
 -1.1505945000000001e-05 instead of -1.1505945e-05.

>> gcc 4.5.2 built version(rubyinstaller version) shows not disired result.
>> But gcc 4.7.2 and MSVC v16.0 built version shows a correct result.
>
> Not a big problem, I'm just trying to understand things.  Am I misreading=
/misinterpreting things?

I just mentioned the issue is occurred on mingw32 gcc 4.5.2 compiler
due to the excess precision.

>
>> BTW, why we should consider  FP precision?
>> When converting string value to double value, ruby calls ruby_strtod
>> function instead of native strtod function.
>> The ruby_strtod function is based on David M. Gay's netlib library
>> which requires double-precision (53-bit) rounding precision.
>
> This raises the question of whether Ruby really supports "the native arch=
itecture's double-precision floating point representation" as described on =
Float's RDoc.  Does strtod work properly on systems that use something othe=
r than IEEE 754 binary64 (e.g. VAX)?

I have no idea why ruby call David M. Gay's strtod instead of native
strtod funciton.

>>> Is the __MINGW32__ macro enough of a check?  I wonder if it could enabl=
e
>>> the _control87 call on system where it is not present.
>>>
>> Ruby 1.9.x requires Windows 2000 or later OS which requires Pentium CPU.
>> And most x86 processors since the Intel 80486 have had x87
>> instructions implemented in the main CPU.
>> I cannot imagine a system with Windows 2000 and not present x87 instruct=
ions.
>
> There is Windows RT...
>
> http://en.wikipedia.org/wiki/Windows_RT
>
> ...but I don't know whether Ruby runs on it. :-)
>
The patch can be more strict like this:
#if defined(__MINGW32__) && defined(_M_IX86)
    _control87(_PC_53, _MCW_PC);
#endif


Regards,
Park Heesob

In This Thread