Post Reply 
HP 11C real root finder [Newton Method]
01-12-2014, 08:31 AM
Post: #4
RE: HP 11C real root finder [Newton Method]
Here is a version that requires coding f(x) only since it approximate f'(x) as:

f'(x) = (f(x+h) - f(x))/h

Where h = 0.001*(ABS(X)+1)

The new version uses registers R1 through R4.

Code:
LBL 0
RCL 1
ABS
1
+
EEX
3
CHS
*
STO 3            # calculate and store increment h
RCL 1
GSB 1
STO 4            # calculate and store f(x)
RCL 1
RCL 3
+
GSB 1            # calculate f(x+h)
RCL 4
-
1/X
RCL 4
*
RCL 3
*                    # calculate diff = h *f(x)/(f(x+h) - f(x))
STO- 1
ABS
RCL 2
X<=Y?
GTO 0
RCL 1
RTN
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: HP 11C real root finder [Newton Method] - Namir - 01-12-2014 08:31 AM



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