The Museum of HP Calculators

Annuities and Compound Amounts for the HP-95C

This program is Copyright © 1977 by Hewlett-Packard Company and is used here by permission. It was originally printed in the HP-95C Applications book. This program was entered by André Wilhelmus and the curator added comments from the HP manual.

This program is supplied without representation or warranty of any kind. André Wilhelmus, Hewlett-Packard and The Museum of HP Calculators therefore assume no responsibility and shall have no liability, consequential or otherwise, of any kind arising from the use of this program material or any part thereof.

Program Listing

CODE KEYS
A-000    lbl A f LBL A
A-001       55 CL X Initialize by clearing PMT,
A-002    35  3 STO 3 PV, FV (BAL) registers
A-003    35  4 STO 4
A-004    35  5 STO 5 - - - - - - - - - - - - - - - - - - - -
A-005 62 63 b0 g JUMP B 0 Jump to ordinary annuity
b-000    lbl b f LBL B - - - - - - - - - - - - - - - - - - - -
b-001    45 .2 RCL . 2
b-002    62 41 g x=0
b-003    63  0 GTO 0
b-004        0 0 Annuity mode toggle
b-005    35 .2 STO . 2 0 = annuity due
b-006    61 53 f RTN
b-007 61 63  0 f LBL 0
b-008        1 1
b-009    35 .2 STO . 2
b-010    61 53 f RTN - - - - - - - - - - - - - - - - - - - -
b-011 61 63  1 f LBL 1 Store dummy for n
b-012        0 0
b-013    35  1 STO 1 - - - - - - - - - - - - - - - - - - - -
b-014    53  0 GSB 0 Calculate subroutine
b-015    45  5 RCL 5 - - - - - - - - - - - - - - - - - - - -
b-016    61  0 f LAST x
b-017       49
b-018    45  4 RCL 4
b-019    61  0 f LAST x Solve for n
b-020       59 + and store it in R1
b-021       24 ÷
b-022       22 CHS
b-023    61  4 f LN
b-024    45  7 RCL 7
b-025    61  4 f LN
b-026       24 ÷
b-027    35  1 STO 1
b-028    61 53 f RTN - - - - - - - - - - - - - - - - - - - -
b-029 61 63  2 f LBL 2
b-030        0 0 Clear R2 for sum of i terms.
b-031    35  2 STO 2 - - - - - - - - - - - - - - - - - - - -
b-032    45  5 RCL 5
b-033    45  1 RCL 1 - - - - - - - - - - - - - - - - - - - -
b-034    45  3 RCL 3 If PMT = 0, GTO
b-035    62 41 g x=0 n, i, PV, FV solution.
b-036    63  6 GTO 6 - - - - - - - - - - - - - - - - - - - -
b-037       39 × Start guess of i.
b-038       59 + n PMT + BAL
b-039    45  4 RCL 4 If PV = 0, GTO FV guess.
b-040    62 41 g x=0 - - - - - - - - - - - - - - - - - - - -
b-041    63  9 GTO 9
b-042       59 + PV Guess for i.
b-043    45  1 RCL 1
b-044       24 ÷ (n PMT + BAL + PV) / n
b-045    45  4 RCL 4
b-046    63  7 GTO 7 - - - - - - - - - - - - - - - - - - - -
b-047 61 63  9 f LBL 9
b-048    45  5 RCL 5
b-049    61  0 f LAST x
b-050       59 +
b-051       21 ENTER ↑
b-052       59 + FV guess for i.
b-053    45  1 RCL 1
b-054        1 1
b-055       49
b-056       42
b-057    45  3 RCL 3
b-058       39 ×
b-059    45  5 RCL 5
b-060       49 - - - - - - - - - - - - - - - - - - - -
b-061 61 63  7 f LBL 7 Guess for i.
b-062       24 ÷ - - - - - - - - - - - - - - - - - - - -
b-063       22 CHS
b-064       66 If guess is less than -0.9
b-065        9 9 use -0.9 for guess.
b-066       22 CHS
b-067    61 43 f x≤y
b-068       11 x⇔y - - - - - - - - - - - - - - - - - - - -
b-069    53  9 GSB 9 Store guess as a %.
b-070    62 41 g x=0 - - - - - - - - - - - - - - - - - - - -
b-071    61 53 f RTN If guess = 0 stop.
b-072 61 63  8 f LBL 8 - - - - - - - - - - - - - - - - - - - -
b-073    53  0 GSB 0 Calculate f(i)
b-074       59 +
b-075    45  4 RCL 4
b-076       59 + - - - - - - - - - - - - - - - - - - - -
b-077    45  8 RCL 8
b-078    45  1 RCL 1
b-079    45  7 RCL 7
b-080       24 ÷
b-081       39 ×
b-082    35  6 STO 6
b-083    45 .0 RCL . 0 Calculate f'(i)
b-084    45  9 RCL 9
b-085       24 ÷
b-086       49
b-087    45 .1 RCL . 1
b-088       39 ×
b-089    45  0 RCL 0
b-090       39 ×
b-091    45  6 RCL 6
b-092    45  5 RCL 5
b-093       39 ×
b-094       49 - - - - - - - - - - - - - - - - - - - -
b-095       24 ÷ f(i) / f'(i)
b-096       22 CHS - - - - - - - - - - - - - - - - - - - -
b-097    53  9 GSB 9 Compute next i.
b-098    45  2 RCL 2 - - - - - - - - - - - - - - - - - - - -
b-099       24 ÷
b-100    61  2 f ABS Test increment to i for limit.
b-101       23 EEX
b-102       22 CHS
b-103        6 6
b-104    61 43 f x≤y
b-105    63  8 GTO 8 - - - - - - - - - - - - - - - - - - - -
b-106    45  2 RCL 2 Stop and display.
b-107    61 53 f RTN - - - - - - - - - - - - - - - - - - - -
b-108 61 63  6 f LBL 6
b-109    45  5 RCL 5
b-110    45  4 RCL 4
b-111       24 ÷ Compute i for n, i, PV, FV
b-112       22 CHS problem.
b-113    45  1 RCL 1
b-114       44 1/x
b-115       43 yx
b-116        1 1
b-117       49 - - - - - - - - - - - - - - - - - - - -
b-118 61 63  9 f LBL 9
b-119       23 EEX Convert i to % and add to R2
b-120        2 2
b-121       39 ×
b-122 35 59  2 STO + 2
b-123    61 53 f RTN - - - - - - - - - - - - - - - - - - - -
b-124 61 63  3 f LBL 3
b-125        1 1 Store dummy 1 for PMT.
b-126    35  3 STO 3 - - - - - - - - - - - - - - - - - - - -
b-127    53  0 GSB 0 Calculate subroutine.
b-128       44 1/x - - - - - - - - - - - - - - - - - - - -
b-129    45  4 RCL 4
b-130       13 R↑
b-131       59 + Solve for PMT and store it
b-132       39 × in R3
b-133       22 CHS
b-134    35  3 STO 3
b-135    61 53 f RTN - - - - - - - - - - - - - - - - - - - -
b-136 61 63  4 f LBL 4
b-137        1 1 Store dummy 1 for PV.
b-138    35  4 STO 4
b-139    53  0 GSB 0 - - - - - - - - - - - - - - - - - - - -
b-140       59 + Calculate subroutine.
b-141       22 CHS - - - - - - - - - - - - - - - - - - - -
b-142    35  4 STO 4 Solve for PV and store it
b-143    61 53 f RTN in R4
b-144 61 63  5 f LBL 5 Calculate subroutine.
b-145    53  0 GSB 0 - - - - - - - - - - - - - - - - - - - -
b-146    45  4 RCL 4
b-147       59 + Solve for FV(BAL) and
b-148    45  8 RCL 8 store it in R5
b-149       24 ÷
b-150       22 CHS
b-151    35  5 STO 5
b-152    61 53 f RTN - - - - - - - - - - - - - - - - - - - -
b-153 61 63  0 f LBL 0 1 → R.1 for ordinary annuity.
b-154        1 1
b-155    35 .1 STO . 1 - - - - - - - - - - - - - - - - - - - -
b-156    45  2 RCL 2
b-157       51 % i → R9.
b-158    35  9 STO 9 - - - - - - - - - - - - - - - - - - - -
b-159       59 + 1 + i → R7.
b-160    35  7 STO 7 - - - - - - - - - - - - - - - - - - - -
b-161    45 .2 RCL . 2
b-162    62 41 g x=0 If annuity due 1 + i → R.1.
b-163       11 x⇔y
b-164    35 .1 STO . 1 - - - - - - - - - - - - - - - - - - - -
b-165    45  7 RCL 7
b-166    45  1 RCL 1 (1 + i)-n → R8
b-167       22 CHS
b-168       43 yx
b-169    35  8 STO 8 - - - - - - - - - - - - - - - - - - - -
b-170    45  5 RCL 5
b-171       39 ×
b-172        1 1
b-173    45  8 RCL 8
b-174       49 1 - (1 + i)-n → R.0
b-175    35 .0 STO . 0 - - - - - - - - - - - - - - - - - - - -
b-176    45  3 RCL 3
b-177    45  9 RCL 9 PMT/i → R0
b-178       24 ÷
b-179    35  0 STO 0 - - - - - - - - - - - - - - - - - - - -
b-180    45 .1 RCL . 1 Calculate
b-181       39 × (PMT/i) [1 - (1+i)-n]R.1
b-182       39 ×
b-183    61 53 f RTN

Go back to the HP-95C software library
Go back to the general software library
Go back to the main exhibit hall