Created
October 6, 2018 19:32
-
-
Save bdw/f1c4db2a029c8e601025d0caa23ade0c to your computer and use it in GitHub Desktop.
shift test
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env nqp | |
sub shifter(int $x, int $y) { | |
nqp::abs_i(nqp::bitshiftl_i($x, $y)); | |
} | |
my int $i := 0; | |
while ($i++ < 1_000_000) { | |
my $x := shifter(10,3); | |
if (shifter(10,3) != 80) { | |
nqp::die("OHNO $i $x"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment