Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!yale!mintaka!space.mit.edu!cmoore From: cmoore@space.mit.edu (Christopher B. Moore) Newsgroups: comp.sys.handhelds Subject: HP48 units bug Keywords: hp48, bug, units, UBASE, UFACT Message-ID: <1990Sep19.024034.15518@mintaka.lcs.mit.edu> Date: 19 Sep 90 02:40:34 GMT Sender: daemon@mintaka.lcs.mit.edu (Lucifer Maleficius) Reply-To: cmoore@space.mit.edu (Christopher B. Moore) Organization: MIT Center for Space Research Lines: 36 I have discovered what appears to be a previously unreported bug in my revision D ROMs. The units application fails to properly handle units with fractional powers. The problem is easy to demonstrate by taking the square root of 1_N (that's one Newton) and then trying to convert to base units with UBASE. The correct answer is, of course, 1_kg^.5*m^.5/s but the calculator returns 1_kg*m/s. The calculator does not handle fractional powers of units, rather it simple rounds to the nearest integer power. Another interesting result is that the UBASE of 1_N^.3333333 returns 1_1/s. It appears that UFACT calls UBASE because it suffers from the same bug. This bug has been independently verified on another D-ROM and an E-ROM. I called HP calculator support today (9/18). I was told that they were aware that the calculator behaves in this fashion and that the engineers who designed it made a "concious decision" to round fractional powers of units in order to make the calculator faster. When I pointed out to the person on the phone that the answer was WRONG, he agreed but said that it was done so that the calculator would be faster. When I told him that fast calculators that give incorrect results are completely worthless, he suggested that I simply type UBASE after every unit I enter. That fixes the bug sometimes, but trying UBASE of 1_m^.5/s^.5 gives 1_m/s. There is no way around it other than to ignore the units application completely. I find it astonishing that HP would conciously produce a computational device that gives incorrect results and claim that it was done to promote speed of computation. If you care about units, call HP (503-757-2004) and tell them that this is a bug and that it should be fixed. They said that if they get enough complaints they _might_ fix it. It makes me wonder what other undocumented surprises reside in this machine. This is ridiculous. Christopher B. Moore cmoore@space.mit.edu