From: Rafael Garcia-Suarez Date: Wed, 4 May 2005 20:50:59 +0000 (+0000) Subject: Document the unportability of atan2() edge cases X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=519bc77726e9fd6164d3ad64bae10fdea36cae2a;p=p5sagit%2Fp5-mst-13.2.git Document the unportability of atan2() edge cases and remove unportable tests (by Steve Peters) p4raw-id: //depot/perl@24388 --- diff --git a/pod/perlport.pod b/pod/perlport.pod index 863f84d..f4e6ddf 100644 --- a/pod/perlport.pod +++ b/pod/perlport.pod @@ -1540,6 +1540,17 @@ suffixes. C<-S> is meaningless. (Win32) C<-x> (or C<-X>) determine if a file has an executable file type. (S) +=item atan2 Y,X + +Due to issues with various CPUs, math libraries, compilers, and standards, +results for C may vary depending on any combination of the above. +Perl attempts to conform to the Open Group/IEEE standards for the results +returned from C, but cannot force the issue if the system Perl is +run on does not allow it. (Tru64, HP-UX 10.20) + +The current version of the standards for C is available at +L. + =item binmode FILEHANDLE Meaningless. (S, S) diff --git a/t/op/exp.t b/t/op/exp.t index 707deb9..9bc44b4 100755 --- a/t/op/exp.t +++ b/t/op/exp.t @@ -6,7 +6,7 @@ BEGIN { require './test.pl'; } -plan tests => 22; +plan tests => 16; # compile time evaluation @@ -54,10 +54,6 @@ cmp_ok(round(cos(-1 * $pi)), '==', -1.0); cmp_ok(round(cos($pi_2)), '==', 0.0); cmp_ok(round(cos(-1 * $pi_2)), '==', 0.0); -# atan2() tests -cmp_ok(round(atan2(-0.0, 0.0)), '==', 0); -cmp_ok(round(atan2(0.0, 0.0)), '==', 0); -cmp_ok(round(atan2(-0.0, -0.0)), '==', round(-1 * $pi)); -cmp_ok(round(atan2(0.0, -0.0)), '==', round($pi)); -cmp_ok(round(atan2(-1.0, 0.0)), '==', round(-1 * $pi_2)); -cmp_ok(round(atan2(1.0, 0.0)), '==', round($pi_2)); +# atan2() tests were removed due to differing results from calls to +# atan2() on various OS's and architectures. See perlport.pod for +# more information.