49 50 Ver6.09.hp Geodesic distance & Earth Euclidean distance calculator, bearing
|
06-23-2020, 10:39 PM
Post: #7
|
|||
|
|||
RE: HP49-50G Geodesic distance calculator
I forgot to include
the subprogram ATAN2, whose location is the utmost parent directory HOME : ATAN2 \<< \-> y x \<< CASE x 0 > THEN '2*ATAN(y/(\v/(x^2+y^2)+x))' END x 0 \<= y 0 \=/ AND THEN '2*ATAN((\v/(x^2+y^2)-x)/y)' END x 0 < y 0 == AND THEN '4*ATAN(1)' END x 0 == y 0 == AND THEN "Undef" END END \->NUM \>> \>> You might choose the alternative formula and program: ATAN2 \<< \-> y x \<< CASE x 0 > THEN y x / ATAN END x 0 < y 0 \>= AND THEN y x / ATAN -17 FS? IF THEN \pi ELSE 180 END + END x 0 < y 0 < AND THEN y x / ATAN -17 FS? IF THEN \pi ELSE 180 END - END x 0 == y 0 > AND THEN -17 FS? IF THEN \pi 2 / ELSE 90 END END x 0 == y 0 < AND THEN -17 FS? IF THEN \pi NEG 2 / ELSE -90 END END "Undef" END \->NUM \>> \>> Note \v/ stands for square root. Regards, Gil |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 6 Guest(s)