Trigonometric Functions for the HP-38C/HP-12C
|
03-26-2016, 09:38 PM
(This post was last modified: 03-26-2016 09:56 PM by Gerson W. Barbosa.)
Post: #7
|
|||
|
|||
RE: Trigonometric Functions for the HP-38C/HP-12C
(03-26-2016 08:21 PM)bshoring Wrote: The Trig functions are working like a charm. Even better now! Thanks for the fun, even though today is still Easter Sunday Eve. Well, no programming tomorrow then :-) Gerson. Fast and Accurate Trigonometric Functions on the RPN-38 CX Simulator Code:
Usage: Trigonometric functions: Enter angles in degrees, -90 =< x <= 90 (*): R/S => cos(x) x<>y => sin(x) x<>y / => tan(x) GTO 35 R/S => arcsin(x) GTO 44 R/S => arccos(x) GTO 50 R/S => arctan(x) ------------------------------------------ 0.0001 R/S --> 1.000000000 ; cos(0.0001) x<>y --> 1.745329252E-06 ; sin(0.0001) / --> 1.745329252E-06 ; tan(0.0001) 0.9999 GTO 35 R/S --> 89.18960866 ; asin(0.9999) 0.9999 GTO 44 R/S --> 0.8102914371 ; acos(0.9999) 0.9999 GTO 50 R/S --> 44.99713507 ; atan(0.9999) Other examples: sin(0.01) = 0.9999999848 sin(0.01) = 1.745329243E-04 tan(0.01) = 1.745329270E-04 sin(30) = 0.8660254038 cos(30) = 0.5000000000 tan(30) = 0.5773502692 sin(60) = 0.500000000(1) cos(60) = 0.866025403(7) tan(60) = 1.73205080(8) sin(89.99) = 0.9999999848 cos(89.99) = 1.7453(37879)E-4 tan(89.99) = 5729.5(49544) sin(89.9999) = 1.000000000 cos(89.9999) = 1.7462(35540)E-6 tan(89.9999) = 572(660.4329) asin(0) = 0.000000000 acos(0) = Error 0 atan(0) = 0.000000000 asin(1e-10) = 90.00000000 atan(0.4142135624) = 22.50000000 atan(1) = 45.00000000 acos(0.8660254038) = 30.00000000 atan(50) = 88.85423716 ------------------------------------------ Forensic result: 9 R/S x<>y R/S R/S / GTO 50 R/S GTO 44 R/S GTO 35 R/S --> 9.000000272 ------------------------------------------ P.S.: (03-26-2016 08:21 PM)bshoring Wrote: The emulator for the HP-38C allows RCL arithmetic so in some cases I've been able to combine steps, so I can put GOTO instructions at the beginning so now I can use: If you replace register n with register 9 then you can save at least three steps, but I think this won't be enough. Anyway, the new labels (35, 44, and 50) are somewhat easier to remember. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 7 Guest(s)