require v5.16; use Test::More qw(no_plan); for(51..66) {my $s = sprintf("%b", 1 << $_ -1); is length($s), $_, "1 << $_ -1"; } __END__ ok 1 - (1 << 51) -1 ok 2 - (1 << 52) -1 ok 3 - (1 << 53) -1 ok 4 - (1 << 54) -1 ok 5 - (1 << 55) -1 ok 6 - (1 << 56) -1 ok 7 - (1 << 57) -1 ok 8 - (1 << 58) -1 ok 9 - (1 << 59) -1 ok 10 - (1 << 60) -1 ok 11 - (1 << 61) -1 ok 12 - (1 << 62) -1 ok 13 - (1 << 63) -1 ok 14 - (1 << 64) -1 not ok 15 - (1 << 65) -1 # Failed test '(1 << 65) -1' # at - line 6. # got: '64' # expected: '65' not ok 16 - (1 << 66) -1 # Failed test '(1 << 66) -1' # at - line 6. # got: '64' # expected: '66' 1..16 # Looks like you failed 2 tests of 16.