10 use Test::More tests => 15;
32 is($x, 4.5, "scalar still floating point");
34 isnt(sqrt($x), 2, "functions still floating point");
36 isnt($x ** .5, 2, "power still floating point");
38 is(++$x, 5.5, "++ still floating point");
41 my $ivsize = $Config{ivsize};
42 skip "ivsize == $ivsize", 2 unless $ivsize == 4 || $ivsize == 8;
46 is($z + 1, -2147483648, "left shift");
47 } elsif ($ivsize == 8) {
49 is($z + 1, -9223372036854775808, "left shift");
53 is(~0, -1, "signed instead of unsigned");
55 # [perl #38485] use integer; 0x80000000/-1;
57 my $ivsize = $Config{ivsize};
58 skip "ivsize == $ivsize", 4 unless $ivsize == 4 || $ivsize == 8;
60 my $iv_min = $ivsize == 4 ? -2147483648 : -9223372036854775808;
62 eval { $biff = $iv_min / -1 };
63 is($@, '', 'IV_MIN / -1 succeeds');
64 is($biff, -$iv_min, 'IV_MIN / -1 == -IV_MIN');
66 eval { $biff = $iv_min % -1 };
67 is($@, '', 'IV_MIN % -1 succeeds');
68 is($biff, 0, 'IV_MIN % -1 == 0');