> On 04 Jun 2016, at 12:11, Carl Mäsak (via RT) <perl6-bugs-follo...@perl.org> 
> wrote:
> 
> # New Ticket Created by  "Carl Mäsak" 
> # Please include the string:  [perl #128318]
> # in the subject line of all future correspondence about this issue. 
> # <URL: https://rt.perl.org/Ticket/Display.html?id=128318 >
> 
> 
> <masak> this may sound outrageous, but I think I've just uncovered a
> bug in Rakudo
> <masak> m: my $x = 0; my $y = ($x - 1) % 8; say $y
> <camelia> rakudo-moar 48fe6a: OUTPUT«7␤»
> <masak> m: my int $x = 0; my $y = ($x - 1) % 8; say $y
> <camelia> rakudo-moar 48fe6a: OUTPUT«-1␤»
> <RabidGravy> well that's definitely "special"
> * masak submits rakudobug
> 
> My expectation is for that second eval to also yield 7. In other
> words, the outcome of the modulo calculation shouldn't change just
> because $x is a native int.

$ perl6 -e 'use nqp; say nqp::mod_i(-1,8); say nqp::mod_I(-1,8,Int)’
-1
7

*if* this is a bug, it is a bug in the underlying nqp::mod_i implementation.



Liz

Reply via email to