Easter Sunday Trigs ( rpn38-CX)
|
04-02-2016, 11:12 PM
(This post was last modified: 04-02-2016 11:12 PM by bshoring.)
Post: #21
|
|||
|
|||
RE: Easter Sunday Trigs ( rpn38-CX)
Gerson,
For what it's worth, I was able to eliminate one program step on the latest and greatest trig program. I replaced the 2nd & 3rd steps: 02 - 31 ENTER 03 - 61 × with a single "RCL X 8" as that squares the value in X register. Having previously removed the line that swapped X<>Y at step 30, the program is now 97 steps. Regards, Bob Regards, Bob |
|||
04-03-2016, 12:20 AM
(This post was last modified: 04-03-2016 12:44 AM by Gerson W. Barbosa.)
Post: #22
|
|||
|
|||
RE: Easter Sunday Trigs ( rpn38-CX)
(04-02-2016 11:12 PM)bshoring Wrote: Gerson, Great! Also, the same can be done twice around 60 steps further in the program. Since I prefer sine in X, I can spare yet another step: Code:
By storing the constant 1/3 in register 7 and replacing the steps 80 through 82 with a single RCL- 7 instruction, per Willy's idea above, two other steps can be saved, thus leaving us six steps more to play with. Regards, Gerson. |
|||
04-03-2016, 09:00 PM
(This post was last modified: 04-03-2016 09:52 PM by Gerson W. Barbosa.)
Post: #23
|
|||
|
|||
RE: Easter Sunday Trigs (rpn38-CX) - Updated version
.
Trigonometric Functions (RPN-38 CX) Code:
Constants: R.0: 1.74532925199433e-2 R.1: 0.199999779 R.2: 0.142841665 R.3: 1.107161127e-01 R.4: 0.086263068 R.5: 0.05051923 R.6: 8.860961556954e-07 R.7: 1.3496016023e-11 R.8: 9.78826891e-17 R.9: 4.12066e-22 ------------------------------------------ Trigonometric Functions: Angles in DEGREES -90 =< x <= 90 R/S --> cos(x) R/S x<>y --> sin(x) R/S / --> tan(x) GTO 35 R/S --> asin(x) 0 =< x <= 1 GTO 46 R/S --> acos(x) 0 =< x <= 1 GTO 54 R/S --> atan(x) 1e-50 < x < 1e42, x=0 GTO 31 R/S --> Rad->Deg GTO 33 R/S --> Deg->Rad ------------------------------------------ Examples: 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.18960856 ; asin(0.9999) 0.9999 GTO 46 R/S --> 0.8102914371 ; acos(0.9999) 0.9999 GTO 54 R/S --> 44.99713507 ; atan(0.9999) 180 RCL × .0 --> 3.141592654 ; π 180 GTO 33 R/S --> 3.141592654 ; 180° = π rad 3.141592654 ENTER 8 / GTO 31 R/S --> 22.50000000 ; π/8 rad = 22.5° Other examples: sin(0.01) = 1.745329243E-04 cos(0.01) = 0.9999999848 tan(0.01) = 1.745329270E-04 sin(30) = 0.5000000000 cos(30) = 0.8660254038 tan(30) = 0.5773502692 sin(60) = 0.8660254038 cos(60) = 0.5000000000 tan(60) = 1.732050808 sin(75) = 0.9659258263 cos(75) = 0.2588190451 tan(75) = 3.732050808 sin(89) = 0.9998476952 cos(89) = 1.745240644E-2 tan(89) = 57.28996163 sin(89.99) = 0.9999999848 cos(89.99) = 1.74532924(0)E-4 tan(89.99) = 5729.577(902) sin(89.9999) = 1.000000000 cos(89.9999) = 1.7452(81608)E-6 tan(89.9999) = 5729(73.3462) asin(0) = 0.000000000 acos(0) = 90.00000000 atan(0) = 0.000000000 asin(1) = 90.00000000 acos(1) = 0.000000000 atan(1) = 45.00000000 asin(1e10) = 90.00000000 atan(0.4142135624) = 22.50000000 acos(0.8660254038) = 30.00000000 atan(50) = 88.85423716 ------------------------------------------ Forensic result: 9 R/S x<>y R/S R/S / GTO 54 R/S GTO 46 R/S GTO 35 R/S --> 9.000000282 ------------------------------------------ The extension of the attached file should be changed to .rpn38 Edited to fix a typo. |
|||
04-04-2016, 04:20 AM
Post: #24
|
|||
|
|||
RE: Easter Sunday Trigs ( rpn38-CX)
Nice program. Same accuracy as before, but with the added conversion functions DEG->RAD & RAD->DEG. Very well done!
Since lines 05 through 15 look like a polynomial, I have been toying with the idea of trying to achieve the same thing using the Net Present Value (NPV) function, to at least compute a Sine, as NPV is based on a polynomial. Of course R.0 and R.6-R.9 would have to be moved into R0-R4. Maybe more trouble than it's worth, but just an idea, out of curiosity. Thanks for the great programs! Regards, Bob |
|||
04-04-2016, 01:20 PM
(This post was last modified: 04-04-2016 04:51 PM by Gerson W. Barbosa.)
Post: #25
|
|||
|
|||
RE: Easter Sunday Trigs ( rpn38-CX)
(04-04-2016 04:20 AM)bshoring Wrote: Since lines 05 through 15 look like a polynomial, I have been toying with the idea of trying to achieve the same thing using the Net Present Value (NPV) function, to at least compute a Sine, as NPV is based on a polynomial. Of course R.0 and R.6-R.9 would have to be moved into R0-R4. Maybe more trouble than it's worth, but just an idea, out of curiosity. The arctangent polynomial starts at line 75. Accuracy is granted is limited ranges, as you can see in the W|A plots: Plot sin(x)-(x-0.166666666665558x^3+0.00833333320429368x^5-0.000198410347967009x^7+0.0000027420184217757x^9),x=0..pi/6 Plot atan(x)-(x-0.333333333333333x^3+0.199999779x^5-0.142841665x^7+0.1107161127x^9-0.086263068x^11+0.05051923x^13),x=0..sqrt(2)-1 Yes, the built-in polynomial solver might be handy, but I've never tried it a program. A program based on this would be interesting. Manually, on the HP-12C: sin(x) ~ x - 1/6*x^3 + 8.333333204e-3*x^5 - 1.98410348e-4*x^7 + 2.742018422e-6*x^9 f CLEAR FIN 3.141592654 ENTER 6 / 1 Delta% i 0 g CF0 1 g CFj 0 g CFj 6 1/x CHS g CFj 0 g CFj 8.333333204 EEX CHS 3 g CFj 0 g CFj 1.98410348 CHS EEX CHS 4 g CFj 0 g CFj 2.742018422 EEX CHS 6 g CFj f NVP --> 0.5000000001 ; sin(pi/6) Regards, Gerson. ---------------------------------------- P.S.: Or, using less registers: y = x^2 sin(x) ~ x*(1 - 1/6*y + 8.333333204e-3*y^2 - 1.98410348e-4*y^3 + 2.742018422e-6*y^4) f CLEAR FIN 3.141592654 ENTER 6 / STO 5 ENTER * 1 Delta% i 1 g CF0 6 1/x CHS g CFj 8.333333204 EEX CHS 3 g CFj 1.98410348 CHS EEX CHS 4 g CFj 2.742018422 EEX CHS 6 g CFj f NVP RCL 5 * --> 0.5000000001 ; sin(pi/6) |
|||
04-05-2016, 04:42 AM
Post: #26
|
|||
|
|||
RE: Easter Sunday Trigs ( rpn38-CX)
Thanks for the insight. This satisfies my curiosity that one can compute Sine, Cosine and Tangent using the Net Present Value function.
Here's my short little program based on your knowledge and hard work! Trig using NPV Angles in Degrees R/S --> cos(x) R/S x<>y --> sin(x) R/S / --> tan(x) Constants: n: 9 R0: 0 R1: 1 R2: 0 R3: -0.166666666666667 R4: 0 R5: 8.333333204E-3 R6: 0 R7: -1.98410348E-4 R8: 0 R9: 2.742018422E-6 R.9: 1.74532925199433e-2 01 - 86 61 9 RCL × .9 02 - 1 1 03 - 24 23 ∆% 04 - 12 i 05 - 24 13 NPV 06 - 31 ENTER 07 - 31 ENTER 08 - 61 × 09 - 32 CHS 10 - 1 1 11 - 51 + 12 - 24 21 √x 13 - 25 7 00 GTO 00 On RPN-38 CX, it only takes 12 program steps. On my original HP-38C, with slight modification, it also works quite nicely, with similar results. So far the NPV route isn't producing quite the level of accuracy that your fine programs do, but I do find it exciting to think that a built in financial function can be used this way! If run on an actual HP-12C or HP-38 E/C, the first line could be replaced with 2 lines: RCL FV X (And the constant 1.745329252E-6 needs to loaded into the FV register). Regards, Bob |
|||
04-06-2016, 02:44 AM
(This post was last modified: 04-06-2016 02:48 AM by Gerson W. Barbosa.)
Post: #27
|
|||
|
|||
RE: Easter Sunday Trigs ( rpn38-CX)
(04-05-2016 04:42 AM)bshoring Wrote: Thanks for the insight. This satisfies my curiosity that one can compute Sine, Cosine and Tangent using the Net Present Value function. On the HP-12C/38C four coefficients will suffice. Notice range reduction is needed here since the polynomial approximation is accurate enough only from -30 to 30 degrees (the argument is divide by three then a trigonometric relation is used to compute the sine of the original angle). But the program becomes somewhat long: 30 steps and 5 constants. The computed values of cosine and tangent become poorer and poorer as the angle approaches 90 degrees. In this case, use the complementary angle. For instance, tan 89.9999° = cot(90° - 89.9999°). On the HP-12C: 90 ENTER 89.9999 - R/S x<>y / --> 572.957.7951 ; tan(89.9999°) 75 R/S -> 0.25881904(43) ; cos(75°) X<>y --> 0.965925826(5) ; sin(75°) x<> / --> 3.7320508(20) ; tan(75°) Regards, Gerson. Code:
|
|||
04-08-2016, 10:42 PM
Post: #28
|
|||
|
|||
RE: Easter Sunday Trigs ( rpn38-CX)
Thanks, Gerson for the programs and explanations. It is interesting that we can use the Net Present Value on a financial calculator to compute sine, up to a point, but as you say, the closer one gets to 90 degrees, the less accurate that method is.
I'd say that the best program is the one you posted on 3 April, 2016. It appears to give the best overall accuracy for the 6 main trig functions. This exercise has been quite an enlightenment for me. Thanks! Regards, Bob |
|||
04-10-2016, 07:16 PM
(This post was last modified: 04-10-2016 09:25 PM by Gerson W. Barbosa.)
Post: #29
|
|||
|
|||
RE: Easter Sunday Trigs ( rpn38-CX)
(04-08-2016 10:42 PM)bshoring Wrote: It is interesting that we can use the Net Present Value on a financial calculator to compute sine, up to a point, but as you say, the closer one gets to 90 degrees, the less accurate that method is. These issues are due mostly to cancellation errors. Notice the polynomial cannot be evaluate for zero when using the NPV method, unless this is properly handled. It appears NVP is not as accurate on the HP-12C Platinum as it is on the HP-12C for certain values, judging by a few results which are better on the latter when it should be otherwise. (04-08-2016 10:42 PM)bshoring Wrote: I'd say that the best program is the one you posted on 3 April, 2016. It appears to give the best overall accuracy for the 6 main trig functions. This exercise has been quite an enlightenment for me. That's the one I like best too. However doing calculations with three or four extra digits doesn't prevent cancellation errors from popping up in those critical regions. (04-08-2016 10:42 PM)bshoring Wrote: Thanks! My pleasure! You might also want to take a look at this this HP-17BII equation, in case you haven't seen it yet. The following program is meant for the REAL HP-38C, but it has been tested only on the HP-12C and the HP-12 Prestige. Regards, Gerson. . Trigonometric Functions - REAL HP-38C Code:
Constants: R0: 1.745329252e-02 R1: -8.86096144e-07 R2: 1.3495798e-11 R3: -9.7284-17 R4: 0.199989464 R5: 0.14247163 R6: -0.0606366 ------------------------------------------ Trigonometric Functions: Angles in DEGREES -90 =< x =< 90 R/S --> cos(x) R/S x≷y --> sin(x) R/S ÷ --> tan(x) GTO 32 R/S --> asin(x) 0 =< x < 1 GTO 38 R/S --> acos(x) 0 < x <= 1 GTO 44 R/S --> atan(x) 1e-50 < x < 1e50, x=0 RCL 0 ÷ --> Rad->Deg RCL 0 × --> Deg->Rad ------------------------------------------ Examples: 0.0001 R/S --> 1.000000000 ; cos(0.0001) ; [result on the HP-12C Prestige: 1.000000000] {HP-15C built-in function result: 1.000000000} x≷y --> 1.745329252E-06 ; sin(0.0001) ; [1.745329252E-06] {1.745329252E-06} x≷y ÷ --> 1.745329252E-06 ; tan(0.0001) ; [1.745329252E-06] {1.745329252E-06} 0.9999 GTO 32 R/S --> 89.18970909 ; asin(0.9999) ; [89.18970856] {89.18970856} 0.9999 GTO 38 R/S --> 0.8102914371 ; acos(0.9999) ; [0.8102914375] {0.8102914371} 0.9999 GTO 44 R/S --> 44.99713507 ; atan(0.9999) ; [44.99713506] {44.99713507} 180 RCL 0 × --> 3.141592654 ; 180° = π rad 3.141592654 ENTER 8 / RCL 0 ÷ --> 22.50000001 ; π/8 rad = 22.5° Other examples: sin(0) = 0.000000000 [0.000000000] {0.000000000} cos(0) = 1.000000000 [1.000000000] {1.000000000} tan(0) = 0.000000000 [0.000000000] {0.000000000} sin(1) = 1.745240644E-02 [1.745240644E-02] {1.745240644E-02} cos(1) = 0.9998476952 [0.9998476952] {0.9998476952} tan(1) = 1.745506493E-02 [1.745506493E-02] {1.745506493E-02} sin(15) = 0.2588190451 [0.2588190451] {0.2588190451} cos(15) = 0.9659258263 [0.9659258263] {0.9659258263} tan(15) = 0.2679491924 [0.2679491925] {0.2679491924} sin(0.01) = 1.745329243E-04 [1.745329243E-04] {1.745329243E-04} cos(0.01) = 0.9999999847 [0.9999999848] {0.9999999848} tan(0.01) = 1.745329270E-04 [1.745329270E-04] {1.745329270E-04} sin(30) = 0.5000000002 [0.5000000000] {0.5000000000} cos(30) = 0.8660254037 [0.8660254038] {0.8660254038} tan(30) = 0.5773502695 [0.5773502693] {0.5773502692} sin(60) = 0.8660254034 [0.8660254038] {0.8660254038} cos(60) = 0.5000000001 [0.5000000000] {0.5000000000} tan(60) = 1.732050804 [1.732050808] {1.732050808} sin(75) = 0.9659258263 [0.9659258265] {0.9659258263} cos(75) = 0.2588190451 [0.2588190445] {0.2588190451} tan(75) = 3.732050808 [3.732050808] {3.732050808} sin(89) = 0.9998476951 [0.9998476952] {0.9998476952} cos(89) = 1.745240958E-2 [1.745240611E-2] {1.745240644E-2} tan(89) = 57.28995131 [57.28996271] {57.28996163} sin(89.99) = 0.9999999850 [0.9999999848] {0.9999999848} cos(89.99) = 1.732050808E-4 [1.745508522E-4] {1.745329243E-4} tan(89.99) = 5773.502604 [5728.989416] {5729.577893} sin(89.9999) = 1.000000000 [1.000000000] {1.000000000} cos(89.9999) = 0.000000000 [2.449489743E-6] {1.745329252E-6} tan(89.9999) = Error 0 [408248.2905] {572957.7951} asin(0) = 0.000000000 [0.000000000] {0.000000000} acos(0) = Error 0 [Error 0] {90.00000000} atan(0) = 0.000000000 [0.000000000] {0.000000000} asin(1) = Error 0 [Error 0] {90.00000000} acos(1) = 0.000000000 [0.000000000] {0.000000000} atan(1) = 45.99999997 [45.99999999] {45.00000000} asin(1e10) = 90.00000000 [90.00000000] {89.99999999} atan(0.4142135624) = 22.49999990 [22.49999994] {22.50000000} acos(0.8660254038) = 29.99999997 [30.00000001] {30.00000000} atan(50) = 88.85423719 [88.85423716] {88.85423716} ------------------------------------------ Forensic result: 9 R/S x≷y R/S R/S ÷ GTO 44 R/S GTO 38 R/S GTO 32 R/S --> 9.707005398 [9.008774143] {9.000417403} ------------------------------------------ P.S.: W|A plots for accuracy checking of the polynomials used in this program: Plot sin(x)-(x-0.1666666645x^3+0.008333198583x^5-0.0001971967922x^7),x=0..pi/6 Plot atan(x)-(x-0.3333333333x^3+0.199989464x^5-0.14247163x^7+0.106x^9-0.0606366x^11),x=0..sqrt(2)-1 P.P.S.: FV in lines 53 and 95 has been replaced with PV. The former is the only register left for the user. |
|||
04-12-2016, 04:16 AM
Post: #30
|
|||
|
|||
RE: Easter Sunday Trigs ( rpn38-CX)
Thanks. Works well on my actual HP-38C. Results as indicated. When I get time I'll set it up also on RPN-38 CX, to see how they compare.
Regards, Bob |
|||
04-13-2016, 12:54 AM
(This post was last modified: 04-14-2016 02:37 AM by Gerson W. Barbosa.)
Post: #31
|
|||
|
|||
RE: Easter Sunday Trigs ( rpn38-CX)
(04-12-2016 04:16 AM)bshoring Wrote: Thanks. Works well on my actual HP-38C. Results as indicated. Thanks for testing it on the real thing. Thanks also for the idea of using NPV to evaluate at least one of the polynomials. This has saved memory for a higher order arctangent polynomial. At least one of the HP-12C results in my previous posting is wrong (copy & paste error) . This is the correct one: 0.9999 GTO 38 R/S --> 0.8102920566 ; acos(0.9999) ; [0.8102914375] {0.8102914371} (04-12-2016 04:16 AM)bshoring Wrote: When I get time I'll set it up also on RPN-38 CX, to see how they compare. Sin(x): x (deg)......HP-38C.........RPN-38CX......HP-15C (1982)...HP-35 (1972) ------------------------------------------------------------------------ 0.000000 0.000000000E+00 0.000000000E+00 0.000000000E+00 0.000000000E+00 0.000010 1.745329252E-07 1.745329252E-07 1.745329252E-07 1.745000000E-07 0.000110 1.919862177E-06 1.919862177E-06 1.919862177E-06 1.919800000E-06 0.022000 3.839724258E-04 3.839724260E-04 3.839724260E-04 3.839723931E-04 3.330000 5.808674960E-02 5.808674960E-02 5.808674960E-02 5.808674961E-02 14.44000 2.493660251E-01 2.493660251E-01 2.493660251E-01 2.493660250E-01 25.55000 4.312985869E-01 4.312985870E-01 4.312985870E-01 4.312985871E-01 36.66000 5.970652564E-01 5.970652564E-01 5.970652564E-01 5.970652561E-01 47.77000 7.404527823E-01 7.404527826E-01 7.404527827E-01 7.404527828E-01 58.88000 8.560867284E-01 8.560867282E-01 8.560867283E-01 8.560867285E-01 69.99000 9.396329131E-01 9.396329128E-01 9.396329127E-01 9.396329127E-01 81.11000 9.879868530E-01 9.879868529E-01 9.879868528E-01 9.879868527E-01 88.88000 9.998089502E-01 9.998089500E-01 9.998089500E-01 9.998089499E-01 89.99000 9.999999850E-01 9.999999848E-01 9.999999848E-01 9.999999848E-01 89.99900 1.000000000E+00 9.999999998E-01 9.999999998E-01 9.999999998E-01 90.00000 1.000000000E+00 1.000000000E+00 1.000000000E+00 1.000000000E+00 Tan(x): x (deg)......HP-38C.........RPN-38CX......HP-15C (1982)...HP-35 (1972) ------------------------------------------------------------------------ 0.000000 0.000000000E+00 0.000000000E+00 0.000000000E+00 0.000000000E+00 0.000010 1.745329252E-07 1.745329252E-07 1.745329252E-07 1.745000000E-07 0.000110 1.919862177E-06 1.919862177E-06 1.919862177E-06 1.919800000E-06 0.022000 3.839724258E-04 3.839724543E-04 3.839724543E-04 3.839724542E-04 3.330000 5.818499267E-02 5.818499267E-02 5.818499267E-02 5.818499266E-02 14.44000 2.575006491E-01 2.575006491E-01 2.575006491E-01 2.575006490E-01 25.55000 4.780471796E-01 4.780471798E-01 4.780471798E-01 4.780471798E-01 36.66000 7.442915883E-01 7.442915882E-01 7.442915883E-01 7.442915880E-01 47.77000 1.101686576E+00 1.101686577E+00 1.101686578E+00 1.101686578E+00 58.88000 1.656411391E+00 1.656411390E+00 1.656411391E+00 1.656411391E+00 69.99000 2.745986127E+00 2.745986118E+00 2.745986117E+00 2.745986119E+00 81.11000 6.393166511E+00 6.393166482E+00 6.393166451E+00 6.393166426E+00 88.88000 5.115045162E+01 5.115043063E+01 5.115042993E+01 5.115042860E+01 89.99000 5.773502604E+04 5.729581914E+04 5.729577951E+05 5.729655162E+04 89.99990 ....Error 0.... 5.729525534E+05 5.729577951E+05 5.730193057E+05 90.00000 ....Error 0.... ....Error 0.... 9.999999999E+99 9.999999999E+99 ArcTan(x): ...x........HP-38C.........RPN-38CX......HP-15C (1982)...HP-35 (1972) ------------------------------------------------------------------------- 0.00000 0.000000000E+00 0.000000000E+00 0.000000000E+00 0.000000000E+00 0.00011 6.302535741E-03 6.302535789E-03 6.302535721E-03 6.302535688E-03 0.15500 8.810733019E+00 8.810732984E+00 8.810732986E+00 8.810732984E+00 0.26795 1.500004317E+01 1.500004315E+01 1.500004317E+01 1.500004317E+01 0.41421 2.249982576E+01 2.249982574E+01 2.249982578E+01 2.249982579E+01 0.57735 2.999998843E+01 2.999998845E+01 2.999998843E+01 2.999998843E+01 0.77700 3.784720679E+01 3.784720676E+01 3.784720677E+01 3.784720676E+01 0.88800 4.160507644E+01 4.160507646E+01 4.160507646E+01 4.160507646E+01 1.00000 4.499999997E+01 4.500000000E+01 4.500000000E+01 4.500000000E+01 1.22200 5.070548705E+01 5.070548704E+01 5.070548702E+01 5.070548702E+01 1.48880 5.611145719E+01 5.611145720E+01 5.611145723E+01 5.611145722E+01 2.11100 6.465265739E+01 6.465265738E+01 6.465265735E+01 6.465265735E+01 4.88800 7.843782363E+01 7.843782359E+01 7.843782359E+01 7.843782360E+01 7.55500 8.246000676E+01 8.246000683E+01 8.246000683E+01 8.246000679E+01 99.9990 8.942705958E+01 8.942705557E+01 8.942705557E+01 8.942705555E+01 7777.77 8.999266614E+01 8.999263339E+01 8.999263339E+01 8.999263337E+01 1.0E+05 9.000000000E+01 8.999942704E+01 8.999942704E+01 8.999942704E+01 The arctangent polynomial constants have been changed slightly: R4: 0.199991241 R5: 0.14251795 R6: -0.0616468 Also, steps 71 through 74 have been changed: 71- 9 72- . 73- 4 74- 1/x Plot #1 Plot #2 Regards, Gerson. Edited to fix a couple a typos in the tables. |
|||
04-13-2016, 04:04 AM
(This post was last modified: 04-13-2016 04:05 AM by Gerson W. Barbosa.)
Post: #32
|
|||
|
|||
RE: Easter Sunday Trigs ( rpn38-CX)
In the previous post I forgot to include a couple HP-12C Platinum results to demonstrate the difference two extra digits can make. Here they are:
0.9999 GTO 038 R/S --> 0.8102914375 ; arccos(0.9999 deg) 0.155 GTO 044 R/S --> 8.810732983 ; arctan(0.155) Compare these with the results obtained on the HP-38C/12C. Since we're talking 38, just another calculation involving a few instances of 38 on both calculators: HP-38C/12C: 0.788888888 ENTER 1138.777777 1/x - GTO 38 --> 38.00000006 HP-12C Platinum/Prestige: 0.788888888 ENTER 1138.777777 1/x - GTO 038 --> 37.999999999 Can you guess what the actual 10-digit result might be? :-) |
|||
04-13-2016, 10:55 PM
Post: #33
|
|||
|
|||
RE: Easter Sunday Trigs ( rpn38-CX)
(04-13-2016 12:54 AM)Gerson W. Barbosa Wrote:(04-12-2016 04:16 AM)bshoring Wrote: Thanks. Works well on my actual HP-38C. Results as indicated. After updating my HP-38C with the new steps and constants in R4-6, I get 0.9999 GTO 38 R/S --> 0.8102920566 (.810291465 with my HP-35v.4) TAN: .00000 I get .01690354059 on HP-38C. 89.999 I get Error 0 (divide by 0) on HP-38C. ArcTan: .00000 I get Error 0 on HP-38C 99.999 I get 8.942705958E+01 on HP-38C I didn't try every one, but of all the rest I tried, I got the same results as you. Pretty good accuracy, I'd say. Going through this exercise gives me a great respect for the talented minds that created the first HP-35 ! Thanks, Bob Regards, Bob |
|||
04-14-2016, 03:01 AM
(This post was last modified: 04-14-2016 03:15 AM by Gerson W. Barbosa.)
Post: #34
|
|||
|
|||
RE: Easter Sunday Trigs ( rpn38-CX)
(04-13-2016 10:55 PM)bshoring Wrote: After updating my HP-38C with the new steps and constants in R4-6, I get I get exactly the same on my HP-12C and my HP-35v.3, respectively. (04-13-2016 10:55 PM)bshoring Wrote: TAN: The latter was supposed to be 89.99. Fixed. Thanks! For .00000, I get tan(.00000) = 0, as it should be. (04-13-2016 10:55 PM)bshoring Wrote: ArcTan: I get arctan(.00000) = 0. For arctan(99.999) my HP-12C returns 8.942705958E+01 just like your HP-38C. Another copy & paste error. Fixed. Thanks! (04-13-2016 10:55 PM)bshoring Wrote: Going through this exercise gives me a great respect for the talented minds that created the first HP-35 ! My feelings as well. They did milk a stone! Regards, Gerson. |
|||
04-14-2016, 04:34 AM
Post: #35
|
|||
|
|||
RE: Easter Sunday Trigs ( rpn38-CX)
On RPN-38 CX, forensic result is 9.000000330. Nice job !
Maybe you should post some of these programs in the General Software Library of this forum. Regards, Bob |
|||
04-15-2016, 08:02 PM
Post: #36
|
|||
|
|||
RE: Easter Sunday Trigs ( rpn38-CX)
Gerson, if two of your Trig programs could be included in the Sample Programs in the next RPN-38 CX update which ones would you include?
Personally, Id suggest one regular one (not using NPV) & one using NPV. Willy is interested as he plans to do an update soon. Regards, Bob |
|||
04-15-2016, 11:28 PM
Post: #37
|
|||
|
|||
RE: Easter Sunday Trigs ( rpn38-CX)
(04-15-2016 08:02 PM)bshoring Wrote: Gerson, if two of your Trig programs could be included in the Sample Programs in the next RPN-38 CX update which ones would you include? Bob, Your suggestion is ok. At first, I didn't see the point of including the program using NPV, as it is meant for the real HP-38C, but it makes sense as some RPN-38 CX user have the real thing and occasionally might run such program on their vintage calculators. I suspect you are my only customer, though :-) So the programs I would choose are the one in post #23, written specifically for RPN-38 CX, and the one in post #29 with the modified constants R4 through R6 and modified steps 71 through 74 as listed in post #31. RPN-38 CX is also a great development tool. Thanks, Willy, for its editing capabilities! If RPN-32 CE is also going to be updated, I would suggest the addition of the conditional tests x<=y and x=0. I haven't explored it yet, but I so far I've seen x=y, x<y and x>y only. Again, thank you for your suggestions and ideas. Gerson. |
|||
04-16-2016, 05:18 PM
Post: #38
|
|||
|
|||
RE: Easter Sunday Trigs ( rpn38-CX)
I think you will be pleased with the next updates of both apps.
Regards, Bob |
|||
06-05-2016, 08:14 PM
Post: #39
|
|||
|
|||
RE: Easter Sunday Trigs ( rpn38-CX)
(04-15-2016 11:28 PM)Gerson W. Barbosa Wrote:(04-15-2016 08:02 PM)bshoring Wrote: Gerson, if two of your Trig programs could be included in the Sample Programs in the next RPN-38 CX update which ones would you include? Gerson, your Trig program of 4 April is included as a sample program in the recent update to RPN-38 CX. It's listed as "Trig Functions (High-Precision)." Constants are automatically loaded if you select "Import w/Regs (all)." You may have to press either Add or Reload Sample Programs the first time after updating the app. Also, your issues with both the 38 & 32 apps should have been addressed with this latest update. RCL arithmetic for Last X was added. Also constants are now saved when exporting to Dropbox and (I think) email. Your program seems to be running perfectly. For ASIN, ACOS, & ATAN, GOTO 35, 46, & 54. Regards, Bob |
|||
06-30-2016, 08:21 PM
(This post was last modified: 06-30-2016 08:21 PM by Gerson W. Barbosa.)
Post: #40
|
|||
|
|||
RE: Easter Sunday Trigs ( rpn38-CX)
(06-05-2016 08:14 PM)bshoring Wrote: Gerson, your Trig program of 4 April is included as a sample program in the recent update to RPN-38 CX. It's listed as "Trig Functions (High-Precision)." Constants are automatically loaded if you select "Import w/Regs (all)." You may have to press either Add or Reload Sample Programs the first time after updating the app. Also, your issues with both the 38 & 32 apps should have been addressed with this latest update. RCL arithmetic for Last X was added. Also constants are now saved when exporting to Dropbox and (I think) email. Thanks! I am not sure High-Precision is a good description though. Sure it is more accurate than the original HP-38C program, but we know there are regions where some precision is lost, even with the extra digits provided by the RPN-38CX Simulator. This might disappoint some users. FWIW, the program for the real HP-38C is now available at the General Software Library: (HP-12C, 12C Platinum, 38C) Trigonometric Functions Best regards, Gerson. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 24 Guest(s)