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 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,5f5a48f21d7f7525 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news3.google.com!feeder.news-service.com!85.214.198.2.MISMATCH!eternal-september.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Inferring array index type from array object Date: Wed, 30 Jun 2010 06:01:57 +0100 Organization: A noiseless patient Spider Message-ID: References: <6b20ed09-efc1-4df7-90f9-5e141482e8d0@d37g2000yqm.googlegroups.com> <1305oqccr1h2t$.x33x4oxwd84d$.dlg@40tude.net> <88ec2vF3uqU1@mid.individual.net> <88f9osFmcmU1@mid.individual.net> <88sld2F9m8U1@mid.individual.net> <73a0af1d-7213-44af-90fa-ed6de4c64ce8@b4g2000pra.googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Date: Wed, 30 Jun 2010 05:01:58 +0000 (UTC) Injection-Info: mx01.eternal-september.org; posting-host="KCXegvZb5vh43D+f3BR6Ew"; logging-data="5724"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18PloGZEZWf8oNLMHOeto5+Nh/dYhobJbQ=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (darwin) Cancel-Lock: sha1:kvuPgQvEeabE5hSVJjCWBZK5Ltk= sha1:MXWYA1M414Jkx9DvS8N6uKf1qnI= Xref: g2news2.google.com comp.lang.ada:12984 Date: 2010-06-30T06:01:57+01:00 List-Id: Adam Beneschan writes: > By the way, I'm not sure that the error is the main reason for having > this function. The result of the two-argument arctan function is in > the range -pi .. +pi, as opposed to -pi/2 .. +pi/2 for the one- > argument variation; this allows you to get a result in any of the four > quadrants (instead of just two), giving you the correct result when > you want to compute the angle corresponding to a point (x, y) on a > Cartesian graph. And avoiding problems with the extremes; arctan (y / x) is a Bad Idea!