Discussion:
Computing atan2(x,y)
(too old to reply)
mjc
2008-03-05 05:26:41 UTC
Permalink
A recent post here (iirc) asked about computing atan2(x,y), the
inverse tan of y/x in the proper quadrant.

The current issue of The College Mathematics Journal has an article by
William Freed and Athanasios Tavouktsoglou with the following formula:

atan2(x,y) = 2*atan(y/(x+sqrt(x^2+y^2)) except for x<0 and y=0;
pi for x<0 and y=0.

This might be of use.
reth
2008-03-05 11:24:47 UTC
Permalink
Post by mjc
A recent post here (iirc) asked about computing atan2(x,y), the
inverse tan of y/x in the proper quadrant.
The current issue of The College Mathematics Journal has an article by
atan2(x,y) = 2*atan(y/(x+sqrt(x^2+y^2)) except for x<0 and y=0;
pi for x<0 and y=0.
This might be of use.
all HP calculators deal perfectly with this issue.
RTFM
Fritz Anderson
2008-03-05 15:57:09 UTC
Permalink
Post by reth
Post by mjc
A recent post here (iirc) asked about computing atan2(x,y), the
inverse tan of y/x in the proper quadrant.
The current issue of The College Mathematics Journal has an article by
atan2(x,y) = 2*atan(y/(x+sqrt(x^2+y^2)) except for x<0 and y=0;
                   pi for  x<0 and y=0.
This might be of use.
all HP calculators deal perfectly with this issue.
RTFM
I am not sure I understand you. With what issue do HP calculators
"deal perfectly?"

It can't be with an atan2 function. There is none in the catalog on my
HP 50g, and the 49 AUR is of no help.
It can't be with atan2(-1, 0), per the formula given above, as it
results in "?".

Please explain.

= Secondary issue
I defined ATAN2 as described above, and attempted to construct
lim(ATAN2(X, 0), 0). CAS seems not to like user-specified functions.
Is this the case? How do people overcome this limitation? Recall the
variable and substitute 0 for Y?

-- F
Curtis A. Jones
2008-03-05 16:56:12 UTC
Permalink
The HP 33S manual suggests using rectangular to polar conversion for
arctan(y/x).
Scott Hemphill
2008-03-05 18:51:33 UTC
Permalink
Post by Curtis A. Jones
The HP 33S manual suggests using rectangular to polar conversion for
arctan(y/x).
On the HP48, you can enter x and y, and then

R\->C ARG

This will return an ATAN in degrees if in degree mode, or in radians if
in radian mode.

Scott
--
Scott Hemphill ***@alumni.caltech.edu
"This isn't flying. This is falling, with style." -- Buzz Lightyear
John H Meyers
2008-03-05 21:30:15 UTC
Permalink
Post by Scott Hemphill
On the HP48, you can enter x and y, and then
R\->C ARG
All HP48/49/50 have these same "user" commands.

[r->] [OFF]

Continue reading on narkive:
Loading...