> On 17 Dec 2015, at 03:48, Zefram (via RT) <perl6-bugs-follo...@perl.org> > wrote: > > # New Ticket Created by Zefram > # Please include the string: [perl #126943] > # in the subject line of all future correspondence about this issue. > # <URL: https://rt.perl.org/Ticket/Display.html?id=126943 > > > > When shifting a non-zero integer left by a very large amount, generally > some kind of error should result, such as memory exhaustion. But for > some values Rakudo is producing silly small outputs: > >> 123 +< (1 +< 31) > 8863084066665136128 >> 123 +< ((1 +< 31) + 1) > 17726168133330272256 >> 123 +< ((1 +< 32) - 1) > 0 >> 123 +< (1 +< 32) > 123 >> 123 +< ((1 +< 32) + 1) > 246 >> 123 +< ((1 +< 33) - 1) > 0 >> 123 +< (1 +< 33) > 123 >> 123 +< ((1 +< 33) + 1) > 246 >> 123 +< ((1 +< 64) - 1) > 61
As with #126941, commit f6091476486d29c8886d gives this a slightly better error message, at least until 6.c. $ 6 'say 123 +< ((1 +< 32) - 1)' Big integer 4294967295 not yet supported on righthand side of '+<' operator Liz