[perl #128913] [BUG] decimal->float non-monotonic conversion

[email protected] ("Zoffix Znet via RT") Fri, 13 Apr 2018 01:38:20 -0700
Newsgroups perl.perl6.compiler
Message-ID <[email protected]>
On Fri, 12 Aug 2016 10:00:17 -0700, [email protected] wrote:
> > "9.9989999999999991e0".EVAL < "9.998999999999999e0".EVAL
> True
> 
> Observe that the literal with a greater nominal value yields a lower
> Num value.  (The .EVAL circumlocution is required to work around [perl
> #128820].)  This implies that at least one of the literals is getting
> incorrect rounding, which was the subject of [perl #128912].  (In fact
> the greater one is getting correct rounding and the lower one is not.
> The correct roundings of both are the same.)  But this case goes beyond
> the rounding merely being incorrect; with this behaviour the rounding
> isn't even self-consistent.
> 
> -zefram

Thank you for the report. This is now fixed.

Fix:  https://github.com/rakudo/rakudo/commit/a760ac3cfc6426d9bd2fb00db
      https://github.com/MoarVM/MoarVM/commit/b735866ddee9bd719440e5c82
Test: https://github.com/perl6/roast/commit/07830c2042b998128