Post Reply 
Recommend root-finder for HP 67
11-30-2019, 03:08 AM (This post was last modified: 11-30-2019 03:10 AM by Namir.)
Post: #2
RE: Recommend root-finder for HP 67
Here is the code for Newton's method for the HP-67:

Code:
Memory Map
============

R0 = Torelance
R1 = x
R2 = h
R3 = fx(x)

Listing
=======

LBL A
STO 1    # Store x
RDN
STO 0    # Store tolerance
LBL 0    # start iteration loop
RCL 1
PAUSE     # View curent guess for root
ABS
1
+
EEX
2
CHS
*
STO 2     # Store h
RCL 1
GSB E     # calculate fx(x)
STO 3
RCL 1
RCL 2
+
GSB E     # calculate fx(x+h)
RCL 3
-
1/X
RCL 3
*
RCL 2
*         # Calculate difference
STO- 1    # X = X - difference
ABS
RCL 0
X<=Y?     # |difference| >= tolerance?
GTO 0     # resume iteration
RCL 1     # display x
RTN
LBL E     # define f(x)
EXP
LASTX
X^2
3
*
-
RTN

Load the above program. Edit the code in LBL E to implement the function you want to find the root for. Then:

1) Enter the tolerance value.
2) Press Enter.
3) Enter the guess for the root.
4) Press the A key.
5) The program will display the intermediate guesses for the solution using a PAUSE statement. Then the program displays the refined guess for the root, based on the tolerance value supplied.

You can calculate fx(x) values by entering a value for x and then pressing the E key.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Recommend root-finder for HP 67 - Trond - 11-29-2019, 06:19 PM
RE: Recommend root-finder for HP 67 - Namir - 11-30-2019 03:08 AM



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