Post Reply 
Easter Sunday Trigs ( rpn38-CX)
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)
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Easter Sunday Trigs ( rpn38-CX) - Gerson W. Barbosa - 04-04-2016 01:20 PM



User(s) browsing this thread: 1 Guest(s)