Package: manpages-dev
Version: 3.10-1
The manpage of the atan2 function reports a wrong function range. The
manpage says that "the return value is in the range [-pi/2, pi/2]",
while by definition and by implementation the range is [-pi, pi].
The following program demonstrates that the range is [-pi, pi] (or,
equivalently, [-180,180]):
#include <stdio.h>
#include <math.h>
int
main (void)
{
double x = cos (M_PI * 0.9);
double y = sin (M_PI * 0.9);
printf ("[%f,%f], atan2=%f\n", x, y, atan2 (y,x) / M_PI * 180.0);
printf ("[%f,%f], atan2=%f\n", x, -y, atan2 (-y,x) / M_PI * 180.0);
return 0;
}
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]