diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 1999-09-17 14:03:44 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 1999-09-17 14:03:44 +0000 |
commit | 65843c0f33efc6b80d1bec1c4bfde40d0a428ffb (patch) | |
tree | aa536f739b59ea76e10fb71dedbff93986733f3c /t/op/arith.t | |
parent | 2ef4205bf93fa5838a18d15b355bcadc44c1c973 (diff) | |
download | perl-65843c0f33efc6b80d1bec1c4bfde40d0a428ffb.tar.gz |
UNICOS has sloppy division/modulo for floating point numbers.
p4raw-id: //depot/cfgperl@4173
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; |