From: Jarkko Hietaniemi Date: Fri, 17 Sep 1999 14:03:44 +0000 (+0000) Subject: UNICOS has sloppy division/modulo for floating point numbers. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=65843c0f33efc6b80d1bec1c4bfde40d0a428ffb;p=p5sagit%2Fp5-mst-13.2.git UNICOS has sloppy division/modulo for floating point numbers. p4raw-id: //depot/cfgperl@4173 --- diff --git a/t/op/arith.t b/t/op/arith.t index f1bd827..fe2f0f4 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;