On Wed, 22 Feb 2017 19:32:31 -0800, comdog wrote:
> Here's a curious change over in precision:
>
> > 4.999999999999999 ~~ 0..^5
> True
> > 4.9999999999999999 ~~ 0..^5
> False
>
> I figure this is an implementation detail that ties to storage, but
> one of the selling points of Perl 6 is that this sort of thing isn't
> a problem anymore.
>
> > $*PERL
> Perl 6 (6.c)
> > $*VM
> moar (2017.01)
The remaining issues are now fixed, in so far as this now gives True, even when
you didn't use the angle brackets:
say 4.99999999999999999999999999999999999999999999 ~~ 0..^5
However, what `4.99999999999999999999999999999999999999999999` exactly is will
likely change slightly in the future, once we have properly working uint64 and
our Rats use it as type for the denominator. One of the proposals is for such
literals to end up as RatStr, so you'd basically have the same behaviour as is
shown earlier on the ticket where using angle brackets to make a RatStr fixes
the noise issue.