diff options
Diffstat (limited to 't/op/arith.t')
-rwxr-xr-x | t/op/arith.t | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/t/op/arith.t b/t/op/arith.t index f1bd827f9b..fe2f0f458b 100755 --- a/t/op/arith.t +++ b/t/op/arith.t @@ -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; |