develooper Front page | perl.perl5.porters | Postings from April 2008

atan2

Thread Next
From:
Jarkko Hietaniemi
Date:
April 8, 2008 17:38
Subject:
atan2
Message ID:
47FC0FF8.20404@iki.fi
Change 33650 by rgs@scipion on 2008/04/06 14:53:02

	Subject: [PATCH] perlfunc.pod: atan2(0,0) returns 0, not undef
	From: Paul Fenwick <pjf@perltraining.com.au>
	Date: Sun, 06 Apr 2008 11:28:27 +1000
	Message-ID: <47F8273B.6010504@perltraining.com.au>

+Note that atan2(0, 0) is not well-defined, however the Perl
+implmentation returns C<0> for this value.

No... the Perl implementation of atan2() returns whatever the underlying
math library returns for atan2().  And that varies.  atan2(0,0) can
return at least zero or NaN(Q).

Either change Perl to always return zero, or keep the correct documentation.

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About