Hello Stefano,

On Thu, Nov 20, 2008 at 6:01 AM, Stefano Teso <[EMAIL PROTECTED]> wrote:
> 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].

Yes.  In fact, someone already reported this and I thought I'd fixed
it for 3.11, but somehow the fix got lost.  It really is fixed now,
and the fix will be in upstream 3.14.

Thanks for reporting this!

Cheers,

Michael

> 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;
> }
>
>
>
>
>
>



-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
git://git.kernel.org/pub/scm/docs/man-pages/man-pages.git
man-pages online: http://www.kernel.org/doc/man-pages/online_pages.html
Found a bug? http://www.kernel.org/doc/man-pages/reporting_bugs.html



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to