summaryrefslogtreecommitdiff
path: root/t/op/64bitint.t
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2001-08-22 21:59:05 +0100
committerAbhijit Menon-Sen <ams@wiw.org>2001-08-22 19:25:01 +0000
commit5479d1922c9c0436fce71aca57c0f7e68ece0b49 (patch)
treef292516c4210a20e1c206f52f089fb064e8cfea5 /t/op/64bitint.t
parent262495b9f2f4fb06bf2b4b3c28907edcf2211f70 (diff)
downloadperl-5479d1922c9c0436fce71aca57c0f7e68ece0b49.tar.gz
64 bit integer preserving pp_divide
Message-Id: <20010822205905.U82818@plum.flirble.org> p4raw-id: //depot/perl@11725
Diffstat (limited to 't/op/64bitint.t')
-rw-r--r--t/op/64bitint.t10
1 files changed, 9 insertions, 1 deletions
diff --git a/t/op/64bitint.t b/t/op/64bitint.t
index c34d188c37..e5ff95bf16 100644
--- a/t/op/64bitint.t
+++ b/t/op/64bitint.t
@@ -16,7 +16,7 @@ BEGIN {
# 32+ bit integers don't cause noise
no warnings qw(overflow portable);
-print "1..58\n";
+print "1..59\n";
my $q = 12345678901;
my $r = 23456789012;
@@ -325,5 +325,13 @@ $q += 0;
print "# \"18446744073709551616e0\" += 0 gives $q\nnot " if "$q" eq "18446744073709551615";
print "ok 58\n";
+# 0xFFFFFFFFFFFFFFFF == 1 * 3 * 5 * 17 * 257 * 641 * 65537 * 6700417'
+$q = 0xFFFFFFFFFFFFFFFF / 3;
+if ($q == 0x5555555555555555 and $q != 0x5555555555555556) {
+ print "ok 59\n";
+} else {
+ print "not ok 59 # 0xFFFFFFFFFFFFFFFF / 3 = $q\n";
+ print "# Should not be floating point\n" if $q =~ tr/e.//;
+}
# eof