The Museum of HP Calculators


HP-32Sii: Some Useful Formulae

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.

Description

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:

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.

Notes

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:

2+3
XEQs to 5.0000; SOLVE requests an A..Z variable to solve for, and when you select any, hums for a while, then says NO ROOT FND, which makes sense as the "function" is flat and non-zero for all values (an attempt to find the root of the function "0" produced an answer of 1.0000, must be that's the initial, initial guess :).
2=3
EVALs to -1.0000 (so an equals sign is replaced by a minus one here); SOLVE will treat as above.
A=B+C
EVAL will request values for all three unknowns, then compute A-B-C; SOLVE will request which variable to solve for, then the values of the other two unknowns, and finally solve the requested one.
A+B=C
Same logic as A=B+C.

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, ↰1 and ↱1. And meters to feet, that's one of the conversion formulae I added in this webpage.

Example

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

↰ DISP F(I)X 2      it's only dollars and sense here

↱ EQN               and select TVM equation
↱ 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
necessary to lower your payment by $10.00, to -176.89?

↱ EQN               (re)select TVM equation
↱ 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?

↱ EQN               (re)select TVM equation
↱ 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 + ↰ 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).

Program Listing

HP's Time Value of Money, END payments only, and with PYM (Payments per Year) functionality:

(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

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:

((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

Body-mass index, or BMI, computed from Metric height and weight:

B×M^2=K where B is your resultant BMI
              M is your height in meters
              K is your weight in kilograms

Three English - Metric conversions unfortunately not built-in:

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

Resources Used

Go back to the software library
Go back to the main exhibit hall