Post Reply 
PPC Journal V2N6 - TVM i% unknown on HP-65
10-16-2015, 06:39 PM
Post: #11
RE: PPC Journal V2N6 - TVM i% unknown on HP-65
(10-16-2015 04:52 PM)AndiGer Wrote:  Running with flag 1 set (begin mode) yields 6.14021. Nearly correct ;-).
Needs 11 iterations if I counted correctly.

Running in end mode with my given values needs 3 iterations.

Yes, that's what I also noticed: End mode works fine, but in Begin mode convergence is very slow, comparable to simple bisection. There must be something wrong with the program. Maybe someone can take a closer look.

In the meantime I tried a different approach. Since I do not own an HP65 maybe someone else may try this code.
IMPORTANT: all data is entered according to the sign convention of later HP calculators!

Code:
 01  LBL
 02  B
 03  RCL 1
 04  RCL 3
 05  x
 06  RCL 4
 07  +
 08  RCL 5
 09  +
 10  RCL 5
 11  RCL 4
 12  -
 13  RCL 1
 14  x
 15  /
 16  2
 17  x
 18  STO 2
 19  LBL 1
 20  EEX
 21  3
 22  /
 23  1
 24  +
 25  1
 26  g x=y?
 27  GTO
 28  2
 29  RCL 2
 30  +
 31  STO 6
 32  RCL 1
 33  CHS
 34  g
 35  y^x
 36  STO 7
 37  RCL 5
 38  x
 39  1
 40  RCL 7
 41  -
 42  RCL 3
 43  x
 44  RCL 2
 45  /
 46  STO 8
 47  f
 48  TF 1
 49  RCL 6
 50  x
 51  +
 52  RCL 4
 53  +
 54  RCL 8
 55  RCL 2
 56  /
 57  RCL 3
 58  RCL 2
 59  /
 60  f
 61  TF 1
 62  RCL 3
 63  +
 64  RCL 5
 65  -
 66  RCL 7
 67  x
 68  RCL 1
 69  x
 70  RCL 6
 71  /
 72  -
 73  /
 74  STO
 75  +
 76  2
 77  GTO
 78  1
 79  LBL 2
 80  RCL 2
 81  EEX
 82  2
 83  x
 84  RTN
 85  LBL
 86  A
 87  STO 1
 88  RTN
 89  LBL
 90  C
 91  STO 3
 92  RTN
 93  LBL
 94  D
 95  STO 4
 96  RTN
 97  LBL
 98  E
 99  STO 5
100  RTN

This version also handles the case that i% is zero (or nearly so). The iteration exits if the last correction term (or i itself) is less than 5 E–7. Your example in Begin mode now requires just three iterations.

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-16-2015 06:39 PM



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