Post Reply 
PPC Journal V2N6 - TVM i% unknown on HP-65
10-15-2015, 01:21 PM (This post was last modified: 10-15-2015 02:08 PM by Dieter.)
Post: #4
RE: PPC Journal V2N6 - TVM i% unknown on HP-65
(10-15-2015 12:35 AM)SlideRule Wrote:  In short, a line of code is missing between lines 47 & 48

In Gene's listing it's actually between line 46 and 47. But the first two lines (LBL B) are missing, so after adding these it should be between line 48 and 49:

Code:
48   81     /
49   34 01  RCL 1
50   32     f-1
51   61     TF 1
...

(10-15-2015 12:35 AM)SlideRule Wrote:  AND a miscode at line 72 (73 w inserted code);
72...35 22...g X<>Y?
was interpreted as
72...35 22...g X<=Y?
rather than
72...35 21...g X<>Y?

No, there is no error at this point. The correct instruction is X≤Y?, or key code 35 22. Here the original listing is wrong! The program finds an iterative solution for the interest rate in R2, and right before this command it adds a correction term (ST0+2) and checks whether its absolute value is sufficiently small. If not ((1E–6 ≤ |correction| which means |correction| ≥ 1E–6), it jumps back and does another iteration. If the X≤Y? test is replaced with X≠Y? the program will almost certainly loop forever ...unless the applied correction term happens to be exactly 1E–6. So yes, the X≤Y? test in Gene's transscription is correct.

BTW Gene, maybe you should repair the formatting of this code on rskey.org from line 71ff. And in both HP65 annuity programs the first two lines are missing (LBL B resp. LBL A).

I tried this program on an HP41 and in some cases it converged to a solution, in others it didn't. Maybe I got the input values wrong, possibly with wrong signs. At least I did not get the results I expected. Can someone provide a sample problem for this program?

Dieter
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: PPC Journal V2N6 - TVM i% unknown on HP-65 - Dieter - 10-15-2015 01:21 PM



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