Re: Documentation fix regarding atan2 - Mailing list pgsql-general

From Bruno Wolff III
Subject Re: Documentation fix regarding atan2
Date
Msg-id 20070905023341.GA28376@wolff.to
Whole thread Raw
In response to Documentation fix regarding atan2  ("Andrew Maclean" <andrew.amaclean@gmail.com>)
Responses Re: Documentation fix regarding atan2  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Documentation fix regarding atan2  ("Andrew Maclean" <a.maclean@cas.edu.au>)
List pgsql-general
On Wed, Sep 05, 2007 at 10:37:18 +1000,
  Andrew Maclean <andrew.amaclean@gmail.com> wrote:
> In Table 9.4 of the documentation atan2 is described as follows:
>   atan2(*x*, *y*) inverse tangent of *x*/*y*
>
> I am sure it should read as:
>   atan2(*y*, x) inverse tangent of y/x

Aren't those two statements sayiong the same thing?
You've just switched the names 'x' and 'y' and not changed their relationships.

>
>
> You can easily test this:
> If y = 2, x = 1, then degrees(atan(y/x)) =63.4 but if we proceed according
> to the documentation; degrees(atan2(x,y))=degrees(atan2(1,2))=25.6 which is
> not the same as degrees(atan(y/x)).

In this example you switched things around part way thorugh. atan2(1,2)
is the atan of (1/2), not atan(2/1) as used at the beginning of the example.

> So it must be degrees(atan2(y,x))=degrees(atan2(2,1))=63.4.

pgsql-general by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Controlling locale and impact on LIKE statements
Next
From: Gregory Stark
Date:
Subject: Re: Controlling locale and impact on LIKE statements