# New Ticket Created by  "Sisyphus" 
# Please include the string:  [perl #132268]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/Ticket/Display.html?id=132268 >


Hi,
Some anomalous rounding behaviour on Ubuntu-16.04 was noted at 
http://www.perlmonks.org/?node_id=1200326

Here are the specifics:

$ perl6 --version
This is Rakudo version 2017.07 built on MoarVM version 2017.07
implementing Perl 6.c.

=======
Issue 1
=======

$ perl6  -e 'say Int(2e25);'
20000000000000001811939328
$ perl6  -e 'say Int(20e24);'
19999999999999997516972032

That seems odd because 2e25 and 20e24 are exactly equivalent.

=======
Issue 2
=======

$ perl6 -e 'say "WTF" if 1.000000000000001e0 == 1e0;'
WTF

That seems odd because 1.000000000000001e0 and 1e0 are quite different 
double precision values. According to perl5:

$ perl -le 'print scalar reverse unpack "h*", pack "d<", 
1.000000000000001e0;'
3ff0000000000005
$ perl -le 'print scalar reverse unpack "h*", pack "d<", 1e0;'
3ff0000000000000

Is it the intention of the perl6 developers that such discrepancies will be 
addressed ?

Cheers,
Rob

Reply via email to