[comp.sys.handhelds] Degree-bug in HP-48

JONASSEN%elsrv1@cs.umass.edu (10/01/90)

 
> A while back, somebody mentioned a bug in the HP involving adding two
> numbers with units of degrees C or degrees F.  A simple example would be
> that '1_C + 1_C' yields 275.15_C when EVAL (C is DEGREES C) is pressed.
 
> Many people were quick to defend HP by saying that it is meaningless to add
> temperatures unless you add them using absolute zero as a reference point. HP
> wrote in their manual (vol I, page 201) "Pure temperature units [as opposed to
> compound units] are converted to absolute temperatures before adding or
> subtracting..."  Thus, HP did this intentionally (or noticed it after the fact
> and described it as a "feature").
 
 
> ---Xeno (Gary Snethen)
> tnan0@isuvax            (Bitnet)
> tnan0@ccvax.iastate.edu (Internet)
 
I must start out by saying that I agree with Gary that this IS a bug, and
after fiddeling around with this problem a bit, I think I found out what
goes wrong in the algorithm:
If you have the problem '1_C + 1_C', what the HP does, is to convert both
numbers to Kelvin (absolute degrees), so you get '274.15_K + 274.14_K', which
is 548.3_K. Then this is converted back to Celsius again, and we get 275.15_C.

This algorithm should work for every other unit conversion, because to get
from one unit to another, you multiply or divide by something. However, to
get from Celcius to Kelvin you SUBTRACT 273.15. Thus Kelvin is not a multiple
of Celsius, and the algorithm will not work.

Then, why should 2 * 1_C work ? Well, I am not to certain about this, but I 
think the algorithm tries to simplify things as much as it can, and it sees 
that there is only one expression with a unit extension, so there is no need 
to convert to a base unit first.

Ken Jonassen
jonassen%elsrv1@cs.umass.edu