[comp.sys.handhelds] A Bug or not ?

bobdobbs@oak.circa.ufl.edu (Amiga Dude) (04/11/91)

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

grover@cleanhead.cs.unlv.edu (Kevin Grover) (04/12/91)

In article <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

I think that the calculator is converting the F to Kelvin and then doing the
addition.  However, there is more to it than just this, because just converting
to Kelvin and adding gave me 560.7  using   (5/9(F - 32) + 273.15) to get Kelvin
from Fahr.  (NOTE:  this is an assumption on my part.  I made it because the 
eq lib does similar things (beacuse most formulas require abs temp in Kelvins
- look up UBASE for more info)  I am passing it along as a possible lead to the
true answer.  (Anyway, hope it helps.)

-- 
  +-------------------------------------------------+----------------------+
  | Kevin Grover             UNLV Computer Science  |     Home of the      |
  | grover@cs.unlv.edu       Las Vegas, Nevada      |    Running REBELS    |
  +-------------------------------------------------+----------------------+

janl@ifi.uio.no (Nicolai Langfeldt) (04/12/91)

Q: Why isn't 45_F 45_F + 90_F =	???
A: Because your HP48 calculates with temperatures in K(elvin). Play around
   with _K and _F and a light will dawn upon you.

Nicolai

peraino@gmuvax.gmu.edu (04/12/91)

>From: bobdobbs@oak.circa.ufl.edu (Amiga Dude)
Lines: 16

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

It was converted to an absolute temperature scale. It's really 549.67 R.
For example, if you edited the answer and changed the F to an R, and then
pressed left-shift  degrees-F, you would get the expected result.

peraino@gmuvax.gmu.edu

HCLIMER%UTCVM.BITNET@CUNYVM.CUNY.EDU (harold climer) (04/13/91)

Not figured  out  this msyself.But there is a lot I haven't figured out about t
he 48 and I have been using it since last August. This is not new I still don't
know all the tricks on a Commodore 128 ? Oh well! Thats life. And bye the bye
sooooo sorry about the Rebs and Bball .Don't feel bad I don' have that much lov
e for Duke either. A former TEXAS AGGIE IN Tennessee.

                                                   Harold Climer

herman@corpane.uucp (Harry Herman) (04/13/91)

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

jmorriso@ee.ubc.ca (John Paul Morrison) (04/18/91)

Well, the HP feature when adding subtracting features is getting discussed
again.ie. what 0_F + 0_F is supposed to mean.

However there _is_ a temperature bug, even though I believe it is performing as documented:

Try raising a temperature to a convenient integer power:

ie 5_C^4. You get 625!!! That is _not_ right! HP does not even follow its 
own rules. 5_C should be converted to kelvins before calculating. I imagine
expressing the answer in C^4 is meaningless,  but K^4 is not meaningless, so
I imagine the answer should always be expressed in K^4.

HP hints, but doesn't state specifically that your answer will be wrong(deliberately),
they just say something about powers and temperature units.

PS 

If you think "yah so what, nobody needs powers of temperature anyways", 
then you have obviously never heard of black body radiation.
-- 
__________________________________________________________________________
 John Paul Morrison                     |
 University of British Columbia, Canada |Coming soon on Disney Home Video:
 Electrical Engineering                 |    
                                        |       "American Psycho"      
 jmorriso@ee.ubc.ca                     |
________________________________________|_________________________________

edp@jareth.enet.dec.com (Eric Postpischil (Always mount a scratch monkey.)) (04/20/91)

In article <1620@fs1.ee.ubc.ca>, jmorriso@ee.ubc.ca (John Paul Morrison)
writes:

>However there _is_ a temperature bug, even though I believe it is
>performing as documented:
>
>Try raising a temperature to a convenient integer power:
>
>ie 5_C^4. You get 625!!! That is _not_ right! HP does not even follow
>its 
>own rules.

I do not see how you can say both "it is performing as documented" and
"HP does not even follow its own rules".  Page 201 of the Owner's Manual
says pure temperature units are converted to absolute temperatures
before adding or subtracting and the sum or difference is then converted
to the level 1 unit.  It doesn't say any such thing is done for
exponentiation.

The "rule" is that temperature units on the 48 can mean either relative
or absolute units, and the 48 tries to figure out which from context. 
For adding and subtracting pure temperature units, it assumes the
meaning is absolute.  For other operations or other forms of the units,
it assumes the meaning is relative.


				-- edp (Eric Postpischil)
				"Always mount a scratch monkey."
				edp@jareth.enet.dec.com

HCLIMER%UTCVM.BITNET@CUNYVM.CUNY.EDU (04/22/91)

Is this "BUG" in all versions? I have version E. I am a M.E at the University
of Tennessee at Chattanooga.(M.E. Thermal) I am taking Heat and Mass Transfer
next fall and it would be nice to know if this is a "BUG".




                               Harold Climer