comp.lang.ada
 help / color / mirror / Atom feed
From: Jack Mitchell <jack@home9999.plus.com>
Subject: Re: Arctan: to use with single or with double arguments?
Date: Sat, 11 Feb 2012 00:26:58 +0000
Date: 2012-02-11T00:26:58+00:00	[thread overview]
Message-ID: <HZwQ6PESXbNPFw+6@plus.net> (raw)
In-Reply-To: dddf2cc2-640c-4878-8ce9-bf9ba13b3736@f6g2000yqa.googlegroups.com

Am I missing something - surely :-

        z = Force * SIN(ATAN2(x,y))

Is the same as :-

        z = Force * x / sqrt( x^2 + y^2 )

This should be much faster (and probably more accurate)
Perhaps I have got x & y swapped but you see my point.



In message
<dddf2cc2-640c-4878-8ce9-bf9ba13b3736@f6g2000yqa.googlegroups.com>, Ada
novice <ycalleecharan@gmx.com> writes
>On Sep 26, 9:31�am, Jeffrey Carter
><spam.jrcarter....@spam.not.acm.org> wrote:
>> I presume because there are some cases where one has a single-valued tangent
>> that my be used in Arctan (Tangent), but not X and Y values for Arctan
>>(Y, X).
>>
>> --
>> Jeff Carter
>> "We'll make Rock Ridge think it's a chicken
>> that got caught in a tractor's nuts!"
>> Blazing Saddles
>> 87
>
>Yes I guess so. Even simple things can easily create confusion. The
>Arctan and Arctan2 functions
>are well-explained in Norman Cohen's Ada book on page 90.
>

-- 
Jack Mitchell



  reply	other threads:[~2012-02-11  0:42 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-24 21:32 Arctan: to use with single or with double arguments? Ada novice
2010-09-24 21:55 ` Jeffrey Carter
2010-09-25  8:44   ` Ada novice
2010-09-25 17:31     ` Jeffrey Carter
2010-09-25 21:34       ` Ada novice
2010-09-26  4:02         ` jpwoodruff
2010-09-26  8:21           ` Ada novice
2010-09-26  7:31         ` Jeffrey Carter
2010-09-26  8:24           ` Ada novice
2012-02-11  0:26             ` Jack Mitchell [this message]
2012-02-11  1:11               ` Adam Beneschan
2012-02-11  8:53                 ` Simon Wright
2012-02-11 10:46                   ` AdaMagica
2012-02-11 15:29                     ` Simon Wright
2012-02-11 16:21                       ` Georg Bauhaus
2012-02-11 16:47                         ` Simon Wright
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox