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:
Vector addition and subtraction. The HP-22S has a built-in rectangular to polar coordinates transform, on blue-SHIFTed keys 1 (X COORD), 2 (Y COORD), 3 (RADIUS), and - (ANGLE). However, using them to convert polar to rectangular, then Σ+ to sum the rectangular from two such executions, recover the sums, and finally convert back to polar seemed a lot of typing, and furthermore I ran into something in the straightforward algorithm that ended up requiring some alphabetic memory (precisely what I was trying to avoid). So in desperation, I derived formulae to do this instead, and as I was already used to looking at those keys above, I used memories W through Z, those keys falling on 1 through 3, and the Z on 0.
The HP-22S's built-in equation LIBRARY contains a wealth of information in very few characters. However, I've been perennially baffled by one particular one (well, one particular one that I'd like to use), that for radioactive decay:
-K×T=LN(N/I) where: K = a constant T = time N = current amount / level of radioactivity I = initial amount / level of radioactivitySo the other units merely require consistency, but what about that K? It's obviously a function of time T, but what function, and more specifically, what value would I use for a specific situation, how could I compute K? Asked that way, the answer was just a "turn the crank" away.
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-22S'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 EVALs it or SOLVEs it. The distinction can best be shown by example:
For vector addition, there's no need for a separate vector subtraction. Instead of subtracting one vector from another, you merely complement the one being subtracted, and add that to the first. By complement I mean add or subtract 180_deg., π/2_radians, or 200_grads, as appropriate, to bring the angle into the "first circle". You can alternately think of this as adding a half-circle of angle then performing a full-circle modulus. To illustrate, here's a vector subtraction transformed to addition where 180_deg. had to be added:
(13 angle 32.6) - (5 angle 100) ≤> (13 angle 32.6) + (5 angle 280)
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, SHIFT 4 SQRT(X) (units conversion, mass) will take you right there. And meters to feet, that's one of the conversion formulae I added in this webpage. Note that as your weight is more likely to change than your height :), you can use the conversion formula for height to meters, save that in M, then as needed compute kilograms right off the keyboard for K.
Sodium 22 has a half-life of 2.605_yrs; how long will a sample take to decay to 25% of its current radioactivity? Use my equation, with T=2.605 yielding K=0.2661, then without rounding K switch to the LIBRARY equation, and solve for T given I=1 & N=0.25. The result will be T=5.2100 (two half-lives, 50% of 50%, no Rocket Science here).
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, and see 25.0667 (roughly 150 BPM illustrated here).
I'm lately 1.7 meters, 87.7 kilograms, and compute 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).
Vector addition (& subtraction by angle complement):
r(x(W:X)+x(Y:Z):y(W:X)+y(Y:Z)) where W is 1st vector's radius θ(x(W:X)+x(Y:Z):y(W:X)+y(Y:Z)) X is 1st vector's angle Y is 2nd vector's radius Z is 2nd vector's angle
Complementary equation to the HP-22S's LIBRARY equation for radioactive decay, -K×T=LN(N/I):
K×T=LN(2)
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×M2=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 .3048×F=M where F is feet, M is meters (no leading zero saves one byte)
Vector addition (& subtraction by angle complement):
Complementary equation to the HP-22S's LIBRARY equation for radioactive decay, -K×T=LN(N/I):
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:
Body-mass index, or BMI, computed from Metric height and weight:
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