Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!coplex!disk!corpane!herman From: herman@corpane.uucp (Harry Herman) Newsgroups: comp.sys.handhelds Subject: Re: A Bug or not ? Message-ID: <1991Apr13.110917.13554@corpane.uucp> Date: 13 Apr 91 11:09:17 GMT References: <00946F29.17B42000@MAPLE.CIRCA.UFL.EDU> Organization: Corpane Industries Inc. Lines: 55 In <00946F29.17B42000@MAPLE.CIRCA.UFL.EDU> bobdobbs@oak.circa.ufl.edu (Amiga Dude) writes: >Well I haven't had my HP48SX long now, but I was messing around with the units, >and did this simple operation: > 45_F (45 Degrees F) > 45_F ( " ) > Well I put them on the stack, levels 2: and 1: then pushed the nifty + (plus) >key, and I expected to see 90_F, but instead I saw 549.67_F, well needless to >say, I looked in the manual, and it said something about Convert performs an >absolute temp. scale conversion, including the additive constants. Well I did >not Convert, I merely added the 2. I suppose I am forgetting something from my >old basic Science days, so what gives ??? Anyone know a simple soln' to the >problem (not that it is of earth-shaking importance, but just curious) ? >Thanks, >Scott D. Alden What is happening is that the HP48 converts all temperature units to absolute scales (Degrees R or Degrees K), does the operation on the converted values and then converts the result back to the units of the number on level 1. I assume the calculator does its work in Degrees K, but don't know for sure. Also, remember that you are asking the calculator to add the absolute temperature 45 Degrees F to the absolute temperature 45 Degrees F. What you really want to be able to do is to add 45 F Degrees (temperature difference) to the absolute temperature 45 Degrees F. Unfortunetly, the HP48 does not know anything about temperature differences, only about absolute temperatures. Fortunately, HP put two functions in the Equation Library Card that DO know about temperature differences. TINC expects the base temperature in level 2, and the delta temperature (positive or negative) in level 1, and adds the delta to the base temperature and the delta temperature together, and returns the result in the units specified for the base temperature in level 2 (not the units specified in level 1 like most unit math operations do). TDELTA subtracts two absolute temperatures and returns the temperature difference, again using the units specified in level 2. There was a discussion about this about a year ago on the HP Bulliten Board Service (I think it was in feedback.to.HP), prior to the release of the Equation Library Card. The reason that HP chose to only use absolute units is explained in that discussion, but it's been so long that I don't remember the reason anymore. p.s. Also note that: 59_\^oF @Base temperature 59_\^oR @Temperature difference in degrees R. SWAP @Swap so that result will be in degrees F. + @Add base+difference. does give 118 degrees F, since the temperature difference was expressed as a temperature relative to absolute 0, instead of a temperature relative to 0 degrees F. Harry Herman herman@ukma!corpane