diff options
author | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2005-05-04 20:50:59 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2005-05-04 20:50:59 +0000 |
commit | 519bc77726e9fd6164d3ad64bae10fdea36cae2a (patch) | |
tree | 90457452ab7269258edd56c26c1ac7ea29e500bc | |
parent | 6ab4a6ffb5877cdeb02bbdd245f9610e46bb2746 (diff) | |
download | perl-519bc77726e9fd6164d3ad64bae10fdea36cae2a.tar.gz |
Document the unportability of atan2() edge cases
and remove unportable tests (by Steve Peters)
p4raw-id: //depot/perl@24388
-rw-r--r-- | pod/perlport.pod | 11 | ||||
-rwxr-xr-x | t/op/exp.t | 12 |
2 files changed, 15 insertions, 8 deletions
diff --git a/pod/perlport.pod b/pod/perlport.pod index 863f84d81d..f4e6ddf06f 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<RISC OS>) +=item atan2 Y,X + +Due to issues with various CPUs, math libraries, compilers, and standards, +results for C<atan2()> 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<atan2()>, 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<atan2()> is available at +L<http://www.opengroup.org/onlinepubs/009695399/functions/atan2.html>. + =item binmode FILEHANDLE Meaningless. (S<Mac OS>, S<RISC OS>) diff --git a/t/op/exp.t b/t/op/exp.t index 707deb98a9..9bc44b49b4 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. |