(25) Resolution of the Catch Equation by a Simple Iterative Method
|
01-16-2019, 08:47 PM
(This post was last modified: 03-04-2019 01:23 PM by SlideRule.)
Post: #1
|
|||
|
|||
(25) Resolution of the Catch Equation by a Simple Iterative Method
An extract from Resolution of the Catch Equation by a Simple Iterative Method, Institut Scientifique et Technique des Pêches Maritimes, ICNAF Res. Doc. 78/VI/19, JUN 1978.
Abstract The solution (F) to the catch equation when catch and population size in numbers are known is determined quickly and accurately using NEWTON's iterative method on a pocket calculator. The method and program are discussed … Expression (5) is very easy to program and compute on simple programmable pocket calculators … Two solutions can be included in the program: either a large initial F is systematically entered to start all of the iterations, or a test of the sign of F is included in the program to eliminate the negative root automatically and return to the iterative step … A typical listing of this program for HP programmable pocket calculators is presented in Table 1. Depending on the model of calculator used, all or parts of the program may be performed automatically … With the model HP-25 calculator used by the author, parts (2), (3) and (5) are performed with the program, while parts (1) and (4) must be done manually, but the whole computation is possible in a single program with models HP-29 or HP-67. The program occupies a small number of program steps and a small amount of memory. BEST! SlideRule ps: see also (HP-65) A Simple Iterative Solution to the Catch Equation |
|||
01-18-2019, 08:12 PM
Post: #2
|
|||
|
|||
RE: (HP-25) Resolution of the Catch Equation by a Simple Iterative Method
(01-16-2019 08:47 PM)SlideRule Wrote: A typical listing of this program for HP programmable pocket calculators is presented in Table 1. Depending on the model of calculator used, all or parts of the program may be performed automatically … I have been looking at the listing, but there are a few things I do not understand. First, the program has 72 steps and it uses line number addressing. Is there any HP calculator with this combination of features? The mentioned HP29C or 67 can handle the program size but they use label addressing. The HP25 can only store the program up to line 48 where it stops. So I wonder what calculator this program is intended for. Looking at the code it seems that several input has be be prestored in various data registers, eg. R0, R1 and R5 which hold the error tolerance. Also there must be a value in R3 before the iteration starts. The program stores such a value in line 62 and 71, but this part of the program does not fit into the HP25's 49 step memory. All in all I do not see any instructions on how to store some initial values into the mentioned registers. But without doing so the program cannot run correctly. To me it looks like a value for M has to be stored in R0, an initial value for F in R1, the desired tolerance in R5 and finally a value for N in R3. The latter may instead be calculated by the last part of the program. But I do not see any instructions for all this in the PDF document. Dieter |
|||
01-18-2019, 11:52 PM
Post: #3
|
|||
|
|||
RE: (HP-25) Resolution of the Catch Equation by a Simple Iterative Method
(01-18-2019 08:12 PM)Dieter Wrote: I have been looking at the listing, but there are a few things I do not understand. I have not looked at the register use yet, but you're right that the provided code does not match any particular machine's capabilities and instruction formats. I'd speculate that the idea was to provide this generic pseudo-code to illustrate Newton's method as implemented in RPN for HP family machines. The author notes that he has an HP-25, and while he knows the 29C and 67 have more steps, he may not be aware they use labels (vs. line numbers) so he wrote out the full procedure using 25-style code. Another possibility (this is a stretch, but feasible) is that his intention was for part of the problem solution to be run from the HP-25 via program execution, while subsequent parts are accomplished via manual keystrokes. Notice that line 48 is a [R/S] (so this much fits in a HP-25 program) and the only GTO statements after this are to 00 (i.e. to stop), so perhaps he ran the program, and when it ended, continued the solution with manual keystrokes. Just speculating, and it does seem this would have been mentioned if it were the case, but assuming his logic is correct, it would work. --Bob Prosperi |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)