diff options
author | Nicholas Clark <nick@ccl4.org> | 2001-08-30 19:20:54 +0100 |
---|---|---|
committer | Abhijit Menon-Sen <ams@wiw.org> | 2001-08-30 19:35:36 +0000 |
commit | e2c88acc9eb721d9206fdbfa8f5977ae2ccaa3c1 (patch) | |
tree | 411d227bb6617e75803ce1f07dbcdf0809c122e5 /t | |
parent | 322806ff874dea1b4b9bb7c9d527befaabdc71b8 (diff) | |
download | perl-e2c88acc9eb721d9206fdbfa8f5977ae2ccaa3c1.tar.gz |
pp_modulo
Message-Id: <20010830182053.A4950@plum.flirble.org>
p4raw-id: //depot/perl@11794
Diffstat (limited to 't')
-rw-r--r-- | t/op/64bitint.t | 30 |
1 files changed, 29 insertions, 1 deletions
diff --git a/t/op/64bitint.t b/t/op/64bitint.t index 92b00d7783..5ea1f2dbdc 100644 --- a/t/op/64bitint.t +++ b/t/op/64bitint.t @@ -17,7 +17,7 @@ BEGIN { use warnings; no warnings qw(overflow portable); -print "1..59\n"; +print "1..63\n"; # as 6 * 6 = 36, the last digit of 6**n will always be six. Hence the last # digit of 16**n will always be six. Hence 16**n - 1 will always end in 5. @@ -351,4 +351,32 @@ if ($q == 0x5555555555555555 and ($q != 0x5555555555555556 print "# Should not be floating point\n" if $q =~ tr/e.//; } +$q = 0xFFFFFFFFFFFFFFFF % 0x5555555555555555; +if ($q == 0) { + print "ok 60\n"; +} else { + print "not ok 60 # 0xFFFFFFFFFFFFFFFF % 0x5555555555555555 => $q\n"; +} + +$q = 0xFFFFFFFFFFFFFFFF % 0xFFFFFFFFFFFFFFF0; +if ($q == 0xF) { + print "ok 61\n"; +} else { + print "not ok 61 # 0xFFFFFFFFFFFFFFFF % 0xFFFFFFFFFFFFFFF0 => $q\n"; +} + +$q = 0x8000000000000000 % 9223372036854775807; +if ($q == 1) { + print "ok 62\n"; +} else { + print "not ok 62 # 0x8000000000000000 % 9223372036854775807 => $q\n"; +} + +$q = 0x8000000000000000 % -9223372036854775807; +if ($q == -9223372036854775806) { + print "ok 63\n"; +} else { + print "not ok 63 # 0x8000000000000000 % -9223372036854775807 => $q\n"; +} + # eof |