comp.lang.ada
 help / color / mirror / Atom feed
From: Ada novice <ycalleecharan@gmx.com>
Subject: Re: Arctan: to use with single or with double arguments?
Date: Sat, 25 Sep 2010 01:44:15 -0700 (PDT)
Date: 2010-09-25T01:44:15-07:00	[thread overview]
Message-ID: <53a2a6fa-9d48-4486-b5c7-aea81a026a82@x18g2000pro.googlegroups.com> (raw)
In-Reply-To: i7j7hm$dcv$1@tornado.tornevall.net

On Sep 24, 11:55 pm, Jeffrey Carter
<spam.jrcarter....@spam.not.acm.org> wrote:
> 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);
>

Thanks. This is true. The default value is 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.

I understand that using Arctan (Y, X) gives the right quadrant. And
the sine of the
Arctan result will depend on the quadrant location of (X, Y). The case
with Arctan (Y/X, 1.0) gives
the principal value of the Arctan function i.e. between -pi/2 and pi/
2.

In my expression: Z = Force * Sin (A) then it was unclear to me if A
in Sin (A) should be limited to -pi/2 to
pi/2 or can can it from to -pi to pi.




  reply	other threads:[~2010-09-25  8:44 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 [this message]
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
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