comp.lang.ada
 help / color / mirror / Atom feed
From: Keith Thompson <kst-u@mib.org>
Subject: Re: Ada 95 ARCTAN function
Date: Sun, 04 Mar 2007 13:16:57 -0800
Date: 2007-03-04T13:16:57-08:00	[thread overview]
Message-ID: <lnd53on1yu.fsf@nuthaus.mib.org> (raw)
In-Reply-To: 1172779385.153524.259420@p10g2000cwp.googlegroups.com

"Adam Beneschan" <adam@irvine.com> writes:
> On Mar 1, 11:38 am, Jacob Sparre Andersen <spa...@nbi.dk> wrote:
>> I don't know where I can find the corresponding specification for the
>> C function atan2(), so I can't give you a proper comparison.
>
> The Unix "man" page for atan2 has some information.  It's not as
> detailed as the Ada manual, because after all this is C and providing
> specific details would infringe on the inalienable right of C
> programmers to shoot themselves in the foot.  However, the man page
> I'm looking at does say:
>
> (1) that the result is between -pi and pi (inclusive), and
>
> (2) the signs of both arguments are used to determine the quadrant of
> the result.
>
> So I'd guess that the semantics are probably the same.

The C99 standard says:

    The atan2 functions compute the value of the arc tangent of y/x,
    using the signs of both arguments to determine the quadrant of the
    return value. A domain error may occur if both arguments are zero.

    The atan2 functions return arctan y/x in the interval [-pi, +pi]
    radians.

-- 
Keith Thompson (The_Other_Keith) kst-u@mib.org  <http://www.ghoti.net/~kst>
San Diego Supercomputer Center             <*>  <http://users.sdsc.edu/~kst>
"We must do something.  This is something.  Therefore, we must do this."
    -- Antony Jay and Jonathan Lynn, "Yes Minister"



  reply	other threads:[~2007-03-04 21:16 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-01 18:58 Ada 95 ARCTAN function saag
2007-03-01 19:38 ` Jacob Sparre Andersen
2007-03-01 20:03   ` Adam Beneschan
2007-03-04 21:16     ` Keith Thompson [this message]
2007-03-01 19:43 ` Dmitry A. Kazakov
2007-03-01 21:39   ` saag
replies disabled

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