> On 06 Jan 2016, at 13:47, Dan Kogai (via RT) <[email protected]>
> wrote:
>
> # New Ticket Created by Dan Kogai
> # Please include the string: [perl #127184]
> # in the subject line of all future correspondence about this issue.
> # <URL: https://rt.perl.org/Ticket/Display.html?id=127184 >
>
>
> Folks,
>
> Rakudo needs to add one more digit for each Num it stringifies.
>
> % perl6 -e 'pi.say'
> 3.14159265358979
> % ruby -e 'puts Math::PI'
> 3.141592653589793
>
> As a result…
>
> % perl6
>> 3.14159265358979 == pi
> False
>> 3.141592653589793 == pi
> True
>
> I consider this more severe than perl5 because:
>
>> ::('&EVAL')(pi.perl) == pi
> False
It seems that currently stringification of Nums is done with this:
multi method Str(Num:D:) {
nqp::p6box_s(nqp::unbox_n(self));
}
Adding an nqp::sprintf(‘%.15f’) in there, only makes the parsing of core
settings infiniloop.
So looks like this is going to need to be fixed at nqp level.
Liz