Date: | Tue, 2 Aug 2016 18:44:30 +0100 |
Subject: | [BUG] Num.WHICH doesn't discriminate enough |
To: | rakudobug [...] perl.org |
From: | Zefram <zefram [...] fysh.org> |
Show quoted text
> my $a = 1180591620717411303424e0
1.18059162071741e+21
Show quoted text> my $b = 1180591620717409992704e0
1.18059162071741e+21
Show quoted text> $a.Int
1180591620717411303424
Show quoted text> $b.Int
1180591620717409992704
Show quoted text> $a == $b
False
Show quoted text> $a === $b
False
Show quoted text> $a.WHICH
Num|1.18059162071741e+21
Show quoted text> $b.WHICH
Num|1.18059162071741e+21
Show quoted text> $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