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,9fe315ab08ea9576 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!feeder.news-service.com!weretis.net!feeder4.news.weretis.net!news.tornevall.net!.POSTED!not-for-mail From: Jeffrey Carter Newsgroups: comp.lang.ada Subject: Re: Arctan: to use with single or with double arguments? Date: Fri, 24 Sep 2010 14:55:49 -0700 Organization: TornevallNET - http://news.tornevall.net Message-ID: References: <908e7aea-ed77-4dce-9f5d-e6341abc1303@s19g2000vbr.googlegroups.com> NNTP-Posting-Host: 171170509fac1e9701c760a95d69b79a Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: 4df0e54f6e2dd5f95ba4602ee3657311 X-Complaints-To: abuse@tornevall.net User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.12) Gecko/20100915 Thunderbird/3.0.8 X-Complaints-Language: Spoken language is english or swedish - NOT ITALIAN, FRENCH, GERMAN OR ANY OTHER LANGUAGE! In-Reply-To: <908e7aea-ed77-4dce-9f5d-e6341abc1303@s19g2000vbr.googlegroups.com> X-UserIDNumber: 1738 X-Validate-Post: http://news.tornevall.net/validate.php?trace=4df0e54f6e2dd5f95ba4602ee3657311 X-Complaints-Italiano: Non abbiamo padronanza della lingua italiana - se mandate una email scrivete solo in Inglese, grazie X-Posting-User: 0243687135df8c4b260dd4a9a93c79bd Xref: g2news1.google.com comp.lang.ada:14246 Date: 2010-09-24T14:55:49-07:00 List-Id: On 09/24/2010 02:32 PM, Ada novice wrote: > > Now I know that Arctan(Y, X) gives the result between -pi to pi while > Arctan(Y / X) gives the result between -pi/2 to pi/2. There is no one-parameter Arctan defined in Ada.Numerics.Generic_Elementary_Functions; the parameter X has a default of 1.0, so what you're really calling is Arctan (Y / X, 1.0); Since the X parameter is positive, it's clear the result will be in quadrant I or IV, or -Pi/2 to Pi/2. Giving both parameters thus seems more accurate, as it correctly handles cases in all 4 quadrants. In addition, it is defined for X = 0.0 (except when Y = 0.0). HTH. -- Jeff Carter "We use a large, vibrating egg." Annie Hall 44