This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
allow Configure -S to run non-interactively (spotted by Greg Hudson
[perl5.git] / t / op / arith.t
index f1bd827..fe2f0f4 100755 (executable)
@@ -10,7 +10,14 @@ try 1,  13 %  4 ==  1;
 try 2, -13 %  4 ==  3;
 try 3,  13 % -4 == -3;
 try 4, -13 % -4 == -1;
-try 5, abs( 13e21 %  4e21 -  1e21) < 1e6;
-try 6, abs(-13e21 %  4e21 -  3e21) < 1e6;
-try 7, abs( 13e21 % -4e21 - -3e21) < 1e6;
-try 8, abs(-13e21 % -4e21 - -1e21) < 1e6;
+
+my $limit = 1e6;
+
+# Division (and modulo) of floating point numbers
+# seem to be rather sloppy in Cray.
+$limit = 1e8 if $^O eq 'unicos';
+
+try 5, abs( 13e21 %  4e21 -  1e21) < $limit;
+try 6, abs(-13e21 %  4e21 -  3e21) < $limit;
+try 7, abs( 13e21 % -4e21 - -3e21) < $limit;
+try 8, abs(-13e21 % -4e21 - -1e21) < $limit;