http://www.perlmonks.org?node_id=1201204


in reply to Re: Small Perl 6 discoveries III, Ints
in thread Small Perl 6 discoveries III, Ints

... there is an up-to-date document on how to report bugs in it on the github project wiki just in case anyone feels like getting more involved

Not that I really wanted to get involved, but I was a little curious about the status of some of the issues raised in this thread.

So, last night, I submitted a bug report that referred to 2 of the issues raised here:
1) that perl6 evaluates '1.000000000000001e0 == 1e0' as true;
2) that perl6 produces different outputs for 'Int(2e25)' and 'Int(20e24)'.

Turns out that the second is the result of a known issue with perl6's way of constructing Nums ... not so sure that the first one is exactly the same issue.
Anyway, Zoffix Znet's reply to the bug report informs us that these bugs will be fixed, though it's presently not all that high on the list of priorities.

Seems that perl6 assigns 2e25 as 2 * 1e25, but assigns 20e24 as 20 * 1e24. Hence the discrepancy.

Cheers,
Rob

Replies are listed 'Best First'.
Re^3: Small Perl 6 discoveries III, Ints
by Anonymous Monk on Oct 12, 2017 at 14:42 UTC
    The problem can be summarized as follows:
    • Some platforms ship with a vendor-supplied libc that's really sloppy.
    • Because of this, perl5 development has been slowly replacing use of libc with home-grown code.
    • However, GNU libc is really good. It's the default libc on many platforms, and it's available on most.
    • As a result, many perl programmers have been experiencing slowly deteriorating quality of numeric implementation for around two decades. Perl6 accelerates this trend.
      Perl6 accelerates this trend

      They seem to be at least perpetuating some unfortunate perl5 design choices. (I see they've also opted for having say/print round doubles to 15 decimal digits of precision.)

      I've mentioned before that Jarkko Hietaniemi plans to replace perl5's current (homegrown) implementation with netlib's gdtoa if he manages to find the tuits.
      I gather that would be an excellent development, but I've no idea whether he will ever find those tuits - and no-one else seems at all interested in doing anything about it.

      Anyway, I have workarounds in place for perl5 but it would be nice if perl6 didn't require the same workarounds.

      Cheers,
      Rob