From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,f8351dd592017faf X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!postnews.google.com!h3g2000cwc.googlegroups.com!not-for-mail From: "saag" Newsgroups: comp.lang.ada Subject: Re: Ada 95 ARCTAN function Date: 1 Mar 2007 13:39:40 -0800 Organization: http://groups.google.com Message-ID: <1172785179.871930.99970@h3g2000cwc.googlegroups.com> References: <1172775505.390886.213420@t69g2000cwt.googlegroups.com> <14xgo99a35l6$.1gbe878d71ue8$.dlg@40tude.net> NNTP-Posting-Host: 20.137.18.51 Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: posting.google.com 1172785187 28316 127.0.0.1 (1 Mar 2007 21:39:47 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Thu, 1 Mar 2007 21:39:47 +0000 (UTC) In-Reply-To: <14xgo99a35l6$.1gbe878d71ue8$.dlg@40tude.net> User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1),gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: h3g2000cwc.googlegroups.com; posting-host=20.137.18.51; posting-account=lrWEew0AAAD1yJtLLICo7KqhZn8jKtdS Xref: g2news2.google.com comp.lang.ada:9632 Date: 2007-03-01T13:39:40-08:00 List-Id: thanks for the quick responses. Didn't exactly phrase my question properly as I'm really interested in whether the Ada arctan function returns a value based on the quadrant - and according to both that diagram & the link in the other post the results in the range (-pi, pi) are what I was hoping for. thanks again On Mar 1, 2:43 pm, "Dmitry A. Kazakov" wrote: > On 1 Mar 2007 10:58:25 -0800, saag wrote: > > > Does the ARCTAN(y,x) function in the ADA.NUMERICS package provide the > > same results an atan2 function call in c? I'm trying to find out if > > Ada supplies an atan2 function (that gives an appropriate answer based > > on the quadrant the original point lies in) > > A.5.1 (11) states that arctan (y, x) yields the result in the quadrant of > the point (x,y). I.e. (with circle=2pi) > > | y>0 | y<0 > -------+-----------+---------- > x>0 | 0..pi/2 | -pi/2..0 > | | > x<0 | pi/2..pi | -pi..-pi/2 > > When x is negative and y is approaches 0 changing its sign, it gets > instable (either pi or -pi). Argument_Error is propagated when x and y are > 0. > > (I cannot tell how this corresponds to the semantics of atan2) > > -- > Regards, > Dmitry A. Kazakovhttp://www.dmitry-kazakov.de