On Sun, 17 Sep 2017 15:17:47 -0700, alex.jakime...@gmail.com wrote: > Plain-wrongs and WHATs print different results today. Bisectable > points at > https://github.com/rakudo/rakudo/commit/242baf256a210f1cb643cb6324916dbc76184c9f > > I think we now only need tests for this ticket. > > On 2015-06-23 09:05:43, hmbrand wrote: > > $ perl6 -e'my int $i = int.Range.min; say $i; say $i +> 16' > > -9223372036854775808 > > -140737488355328 > > $ perl6 -e'my int $i = int.Range.min; say $i; say $i +> 32' > > -9223372036854775808 > > -2147483648 > > $ perl6 -e'my int $i = int.Range.min; say $i; say $i +> 63' > > -9223372036854775808 > > -1 > > $ perl6 -e'my int $i = int.Range.min; say $i; say $i +> 64' > > -9223372036854775808 > > -9223372036854775808 <===== > > plain wrong > > $ perl6 -e'my int $i = int.Range.min; say $i; say $i +> -32' > > -9223372036854775808 > > -39614081257132168796771975168 > > $ perl6 -e'my int $i = int.Range.min; say $i; say $i +> -64' > > -9223372036854775808 > > -170141183460469231731687303715884105728 > > > > $ perl6 -e'my int $i = int.Range.max; say $i; say $i +> 16' > > 9223372036854775807 > > 140737488355327 > > $ perl6 -e'my int $i = int.Range.max; say $i; say $i +> 32' > > 9223372036854775807 > > 2147483647 > > $ perl6 -e'my int $i = int.Range.max; say $i; say $i +> 63' > > 9223372036854775807 > > 0 > > $ perl6 -e'my int $i = int.Range.max; say $i; say $i +> 64' > > 9223372036854775807 > > 9223372036854775807 <= > > PLAIN WRONG > > $ perl6 -e'my int $i = int.Range.max; say $i; say $i +> -2' > > 9223372036854775807 > > 36893488147419103228 > > $ perl6 -e'my int $i = int.Range.max; say $i; say $i +> -32' > > 9223372036854775807 > > 39614081257132168792477007872 > > $ perl6 -e'my int $i = int.Range.max; say $i; say $i +< 2' > > 9223372036854775807 > > -4 <= > > WHAT? > > $ perl6 -e'my int $i = int.Range.max; say $i; say $i +< -2' > > 9223372036854775807 > > 2305843009213693951
For some of these that OP pointed out as questionable I get the same results as in C. For others, the bug still exists, where it just returns an Int instead of overflowing: https://irclog.perlgeek.de/perl6/2017-10-08#i_15272553