The Museum of HP Calculators
Copyright (C) 2002 Glen Kilpatrick
Distributed under GNU General Public License
This program is supplied without representation or warranty of any kind. The author 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.
The customizing formulae that I developed and regularly use are as follows:
Hewlett Packard's implementation of the Time Value of Money relies upon the following principles:
The sign convention is that money received is positive, and money paid out is negative. Thus when you borrow money, that's positive, and your payments are negative. The same problem from the borrower's point of view would have the loan be a negative outlay, and the payments received positive.
The time interval between the Present Value and the Future Value must be divided into one or more periods of equal size.
Periodic payments must be of equal size, the same sign, and all occur at either the beginning or the end of the payment period.
If payments are not all equal to each other, then one has a cash flow problem, and this program won't help (but an HP Financial calculator might).
If some payments occur at the beginning of the payment period, and some at the end, or alternately, the time intervals are of unequal size, these problems aren't described by any implementation I know of, and you might require even more than an HP calculator....
I've adapted the HP-22S's built-in TVM equation, but with some consideration for the HP-10B's added variable P/YR (here stored as Y). Note that as the source equation describes only the situation where payments are made at the END of each period, that I've chosen to keep this as is. If you want a BEGIN/END switch, there's always the HP-15C TVM program I've offered to the MoHPC elsewhere....
What the HP-10B's P/YR streamlines is that pesky part about dividing I by the number of payments you're making in a year, and multiplying N by same (and that BEGIN/END part doesn't hurt :) as a SHIFTed function (which I haven't implemented, as the most basic use of the 10B is the unshifted N number of periods, but you could use years instead by replacing N by N*Y).
Percent heart rate for exercise used to be derived as that percent of 220 minus your age. But the lower percentages revealed are then quite unrealistic. I heard at an exercise club an obvious way to treat this, with 220 minus my age as my maximum, 100%, and my resting heart rate as 0%. Although there are an infinity of curves that pass through two points even with a monotonic increase constraint, it seemed reasonable to make this a linear relationship. Note that I'm not a medical professional, I merely pass along the concepts, you bear all the responsibility for interpretation and use (YMMV as they say :).
Body-mass index, or BMI. This purports to be a better measure of a healthy weight than merely noting height and weight on a recommended chart; I've read that a recommended BMI is 25, and anything over 30 is weigh, I mean 'way too much (but the same disclaimer as above goes, I ain't no doctor, etc.). When you use Metric, this is absurdly simple.
There are several English to Metric conversions that I wished had been included; the formulae for kilometers to miles and to nautical miles, and that for meters to feet, have only modest memory requirements.
The HP-32Sii's built-in SOLVEr provides non-procedural programming; one merely supplies an expression or an equation (the former contains no equals sign, the latter has one), and then either XEQs it or SOLVEs it. The distinction can best be shown by example:
So all of these formulae should be SOLVEd.
As regards the requirement that BMI be calculated in Metric, if you don't have a science background (remember the MKS system?) or have spent time in a foreign country, you may not be familiar with meters or kilograms. However, of these two conversions, kilograms to pounds is available directly on the keyboard, \LS and \RS 1. And meters to feet, that's one of the conversion formulae I added in this webpage.
An example derived from the HP-10B's Owner's Manual (Edition 6, Part Number 00010-90037, November 1994), "5: Time Value of Money Calculations", page 53 (modified as to format, and to show key sequences on the HP-48):
Example: A Car Loan. You are financing a new car with a three year loan at 10.5% annual nominal interest, compounded monthly. The price of the car is $7,250. Your down payment is $1,500. Part 1. What are your monthly payments at 10.5% interest? (Assume your payments start one month after the purchase or at the end of the first period.) Set to End mode ---> not necessary here, this won't do BEGIN mode \LS DISP F(I)X 2 ---> it's only dollars and sense here \RS EQN ---> and select TVM equation \RS SOLVE P ---> select variable to solve for, P(ayment) here Y?0.00 ---> shows current P/YR, requests update 12 \R/S ---> twelve monthly payments in a year I?0.00 10.5 \R/S ---> updating to 6.25% annual nominal interest F?0.00 ---> Future value (already correct, no change) \R/S ---> we're paying off the loan, so FV=0 N?0.00 ---> Number of payments (total, not annual) \RCL Y 3 * R/S ---> Three years times 12 Payments Per YeaR B?0.00 7250 \ENTER 1500 - \R/S ---> loan after down payment See "SOLVING" for a time, then "P=-186.89" Part 2. At a price of $7,250.00, what interest rate is necesary to lower your payment by $10.00, to -176.89? \RS EQN ---> (re)select TVM equation \RS SOLVE I ---> solve for annual I(interest) this time P?-186.89 10 + \R/S ---> new payment $10 less than old (but see general caution below regarding reuse of numbers to 12_digit precision when loans are paid in integer dollars and cents) Y?12.00 \R/S ---> no change to payments per Year, F?0.00 \R/S ---> Future value, N?36.00 \R/S ---> Number of (total) payments, B?5,750.00 \R/S ---> or (Beginning) present value "SOLVING" ... "I=6.75" ---> necessary annual nominal interest rate Part 3. If interest is 10.5%, what is the maximum you can spend on the car to lower your payment to $175,00? \RS EQN ---> (re)select TVM equation \RS SOLVE B ---> solve for (Beginning) present value \P?-176.89 175 \+/- \R/S ---> desired payment Y?12.00 \R/S ---> no change to payments per Year I?6.75 10.5 \R/S ---> return to initial interest F?0.00 \R/S ---> we still want to pay off the loan fully N?36.00 \R/S ---> and no change to number of payments "SOLVING" ... "B=5,384.21" 1500 + ---> we can afford 6,884.21
Remember (as indicated on page 58 of the HP-10B manual), if you compute a PMT, FIX 2 will correctly display it. However, if you then compute other "What If's", you should correct this PMT to two digits to avoid rounding errors. Note this was NOT done in Part 2 above, but a modified recipe of:
10 + \LS RND \R/S ---> gave the same "I=6.75" results this time
I'm 54, measured a resting 88 BPM before exercise, want to aim for 80%, and stop for only 10 seconds; how many beats should I count? SOLVE for H (using above methodology), and see 25.0667 (roughly 150 BPM illustrated here).
I'm lately 1.7 meters, 87.7 kilograms, and SOLVE my BMI as 30.3460 (so why do you think I'm going to exercise clubs, ehh? :).
Ten "klicks" (kilometers) are 6.2137 miles and 5,3996 nautical miles, while 1.7 meters is 5.5774 feet (better known as 5'7", as in my BMI example above).
(P*100*Y/I-F)*(1+I/Y/100)^-N-P*100*Y/I=B where N is Number of payments (replace by "(N*Y)" for number of years) I is percent Interest per year B is (Beginning) present value P is Payment F is Future value Y is number of payments per Year
((220-A-R)*C/100+R)*S/60=H where A is your age R is your resting heart rate C is percent of maximum heart rate S is the number of seconds that you count beats, and H is the number of beats counted
B*M^2=K where B is your resultant BMI M is your height in meters K is your weight in kilograms
1.609344*M=K where M is miles, K is kilometers, 1.852*N=K and N is nautical miles 0.3048*F=M where F is feet, M is meters
Time Value of Money, END only, and with P/YR:
Registers B, I, F, N, P, and Y. and Z.
Percent of maximum heart rate as a linear function of heart rate where 0% is your resting heart rate, 100% is 220 minus your age:
Registers A, C, H, R, and S.
Body-mass index, or BMI, computed from Metric height and weight:
Registers B, K, M.
Three English - Metric conversions unfortunately not built-in:
Registers F, K, M, and N.
Go back to the software library
Go back to the main exhibit hall