develooper Front page | perl.perl6.compiler | Postings from April 2018

[perl #128819] [BUG] Num.WHICH doesn't discriminate enough

Thread Previous | Thread Next
From:
Zoffix Znet via RT
Date:
April 13, 2018 10:35
Subject:
[perl #128819] [BUG] Num.WHICH doesn't discriminate enough
Message ID:
rt-4.0.24-24193-1523615747-248.128819-15-0@perl.org
On Tue, 02 Aug 2016 10:44:50 -0700, zefram@fysh.org wrote:
> > my $a = 1180591620717411303424e0
> 1.18059162071741e+21
> > my $b = 1180591620717409992704e0
> 1.18059162071741e+21
> > $a.Int
> 1180591620717411303424
> > $b.Int
> 1180591620717409992704
> > $a == $b
> False
> > $a === $b
> False
> > $a.WHICH
> Num|1.18059162071741e+21
> > $b.WHICH
> Num|1.18059162071741e+21
> > $a.WHICH eq $b.WHICH
> True
> 
> These are distinct Num values, as seen by .Int, ==, and ===.  But .WHICH
> is erroneously saying that they're the same.  .WHICH should show distinct
> identities for these distinct values.
> 
> -zefram


Thank you for the report. This is now fixed.

Fix:  https://github.com/MoarVM/MoarVM/commit/067c0594103a025
      https://github.com/MoarVM/MoarVM/commit/8841c4241b4faa8
      https://github.com/MoarVM/MoarVM/commit/af2eb8a7f7d4344
      https://github.com/MoarVM/MoarVM/commit/4d3fc2818d0032b
      https://github.com/rakudo/rakudo/commit/8422d7b4e23678b
      https://github.com/rakudo/rakudo/commit/a2a2a745c4242d1
Test: https://github.com/perl6/roast/commit/3f0174e45563d641e

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About