(34C) Accurate TVM for HP-34C
01-10-2014, 04:10 AM (This post was last modified: 12-28-2015 02:37 PM by Jeff_Kearns.)
Post: #1
 Jeff_Kearns Member Posts: 147 Joined: Dec 2013
(34C) Accurate TVM for HP-34C
This is an adaptation of the Pioneer's (42S/35S/33S/32Sii/32S) Accurate TVM routine for the HP-34C using Karl Schneider's technique for invoking SOLVE with the routine written as a MISO (multiple-input, single-output) function, using indirect addressing.

This post has been edited subsequent to feedback on the forum, reducing the size from 66 lines to 40.

HP-34C TVM Routine

001 h LBL A
002 STO f (i)
003 RCL 2
004 EEX
005 2
006 ÷
007 ENTER
008 ENTER
009 1
010 +
011 LN
012 X<>Y
013 LSTx
014 1
015 X≠Y
016 -
017 ÷
018 *
019 RCL 1
020 *
021 e^x
022 RCL 3
023 X<>Y
024 *
025 LSTx
026 1
027 -
028 RCL 4
029 *
030 EEX
031 2
032 RCL 2
033 ÷
034 RCL 6
035 +
036 *
037 +
038 RCL 5
039 +
040 RTN

Usage instructions:

1. Store 4 of the following 5 variables as follows, using appropriate cash flow conventions:
• N STO 1 --- Number of compounding periods
• I STO 2 --- Interest rate (periodic) expressed as a %
• B STO 3 --- Initial Balance or Present Value
• P STO 4 --- Periodic Payment
• F STO 5 --- Future Value
and store the appropriate value (1 for Annuity Due or 0 for Regular Annuity) as
B/E STO 6 --- Begin/End Mode. The default is 0 for regular annuity or End Mode.

2. Store the register number containing the floating variable to the indirect storage register (i).

3. f SOLVE A

Example from the HP-15C Advanced Functions Handbook-

"Many Pennies:

A corporation retains Susan as a scientific and engineering consultant at a fee of one penny per second for her thoughts, paid every second of every day for a year.
Rather than distract her with the sounds of pennies dropping, the corporation proposes to deposit them for her into a bank account in which interest accrues at the rate of 11.25 percent per annum compounded every second. At year's end these pennies will accumulate to a sum

total = (payment) X ((1+i/n)^n-1)/(i/n)

where payment = $0.01 = one penny per second, i = 0.1125 = 11.25 percent per annum interest rate, n = 60 X 60 X 24 X 365 = number of seconds in a year. Using her HP-15C, Susan reckons that the total will be$376,877.67. But at year's end the bank account is found to hold $333,783.35 . Is Susan entitled to the$43,094.32 difference?"

• 31,536,000 STO 1
• (11.25/31,536,000) STO 2
• 0 STO 3
• -0.01 STO 4
• 5 STO f I
• f SOLVE A

The HP-34C gives the correct result: \$333,783.35.

Many thanks to Katie Wasserman, Thomas Klemm and Dieter for adapting the above routine, suggesting the workaround for the lack of Recall Arithmetic in the HP-34C, and testing the routine.

Jeff Kearns
 « Next Oldest | Next Newest »

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