[comp.sys.handhelds] temperature conversion

U5513172@NMSUVM1.BITNET (Thomas L. Baca) (01/23/91)

Hello fellow HP-users,   I have what may be a silly question, but I
shall ask anyway.  WhenI add 25_'C ( read degree Celcius)  and 1_'F
on my HP 48SX, I get an answer of 537.67_'F.  What terribly simple thing
am I overlooking?  My wife tells me that the answer looks like Rankins
(sp?).  Why is this happening?  I heard someone say that they asked HP
about it and got a fix.  However, I don't really know if this guy knew
what he was talking about.  I've never seen a reference to this
phenomenom, so I'm inclined to believe that the problem is not really a
problem.
 
I would appreciate any help on this.
Thanks in advance.
 
Thomas L. Baca
NMSU

silvert@cs.dal.ca (Bill Silvert) (01/24/91)

In article <2D042619A000047E@gacvx1.gac.edu> U5513172@NMSUVM1.BITNET (Thomas L. Baca) writes:
>Hello fellow HP-users,   I have what may be a silly question, but I
>shall ask anyway.  WhenI add 25_'C ( read degree Celcius)  and 1_'F
>on my HP 48SX, I get an answer of 537.67_'F.  What terribly simple thing
>am I overlooking?  My wife tells me that the answer looks like Rankins
>(sp?).  Why is this happening?  I heard someone say that they asked HP
>about it and got a fix.  However, I don't really know if this guy knew
>what he was talking about.  I've never seen a reference to this
>phenomenom, so I'm inclined to believe that the problem is not really a
>problem.

What do you expect the sum of two temperatures to mean?  The HP48SX
doesn't know either.  So it converts the temperatures to the absolute
scale before adding them.  In other words, it converts 25'C to 298.15_K,
1'F to 256_K, adds them, and expresses the result in 'F.  But the result
doesn't mean anything.  The difference of two temperatures is of course
meaningful, and you can add two temperatures in order to average them,
but here you have to be careful: if you want to average 25'C and 1'F you
MUST convert to a common base, add them and divide by two.  The average
of these two temperatures is 39'F, which you don't get by dividing 538'F
by two -- you have to convert to absolute, divide by 2, and convert back
to F.  This is an inconsistency in the way the HP works.


-- 
William Silvert, Habitat Ecology Division, Bedford Inst. of Oceanography
P. O. Box 1006, Dartmouth, Nova Scotia, CANADA B2Y 4A2.  Tel. (902)426-1577
UUCP=..!{uunet|watmath}!dalcs!biomel!bill
BITNET=bill%biomel%dalcs@dalac	InterNet=bill%biomel@cs.dal.ca

khbsnsr@nmt.edu (Kenneth Brunell) (01/24/91)

In article <2D042619A000047E@gacvx1.gac.edu> U5513172@NMSUVM1.BITNET (Thomas L. Baca) writes:
>Hello fellow HP-users,   I have what may be a silly question, but I
>shall ask anyway.  WhenI add 25_'C ( read degree Celcius)  and 1_'F
>on my HP 48SX, I get an answer of 537.67_'F.  What terribly simple thing
>am I overlooking?  My wife tells me that the answer looks like Rankins
>(sp?).  Why is this happening?  I heard someone say that they asked HP
>about it and got a fix.  However, I don't really know if this guy knew
>what he was talking about.  I've never seen a reference to this
>phenomenom, so I'm inclined to believe that the problem is not really a
>problem.
> 
>I would appreciate any help on this.
>Thanks in advance.
> 
>Thomas L. Baca
>NMSU

Yes, it does return the answer in degrees rankine.  I just tried it.
If you add degrees celsius to degrees farenheit, it returns the answer
in degrees kelvin.  In either case, it does not change the units
accordingly.  It must be a bug.  Apparently it neglects to convert back
to the units it is supposed to output in.
-Ken

-------------------------------------------------------------------------------
|  _   ,                __                     _  _  |  "It's green . . ."    |
| ' ) /                /  )                   // //  |       Mr. Scott        |
|  /-<   _  ____      /--<  __  . . ____  _  // //   |                        |
| /   ) </_/ / <_    /___/_/ (_(_/_/ / <_</_</_</_   |   Loooove that .sig    |
|          <khbsnsr@jupiter.nmt.edu>                 |                        |
===============================================================================

rouben@math13.math.umbc.edu (Rouben Rostamian) (01/24/91)

In article <1991Jan24.014724.15552@nmt.edu> khbsnsr@nmt.edu (Kenneth Brunell) writes:
>In article <2D042619A000047E@gacvx1.gac.edu> U5513172@NMSUVM1.BITNET (Thomas L. Baca) writes:
>>Hello fellow HP-users,   I have what may be a silly question, but I
>>shall ask anyway.  WhenI add 25_'C ( read degree Celcius)  and 1_'F
>>on my HP 48SX, I get an answer of 537.67_'F.  What terribly simple thing
>>am I overlooking?
>Yes, it does return the answer in degrees rankine.  I just tried it.
>If you add degrees celsius to degrees farenheit, it returns the answer
>in degrees kelvin.  In either case, it does not change the units
>accordingly.  It must be a bug.  Apparently it neglects to convert back
>to the units it is supposed to output in.

It is not a bug.  Just gotta be careful when adding temperatures.

Digression:  How to boil water cheaply:
    Two bring a galon of water to boil, heat half of it to 106F,
    then another half to 106F, mix and stir well.
    Since 106F + 106F = 212F, then the mixture will be at the
    boiling temperature!

Anoter digression:
    32F + 32F = 64F, you say?  Convert this equation to centigrades.
    Recall 32F = 0C, and 64F = 17.8C, therefore:
    0C + 0C = 17.8C.   Uh... what did you expect 0C + 0C to be?

An experiment on the HP48:
    Try 0C + 0C on the HP48.  You will get 273.17C.  How does it arrive
    at this answer?  It converts the data to Kelvin first (0C = 273.15K)
    then:
	0C + 0C = 273.15K + 273.15K = 546.3K = 273.15C

See page 201 of the owner's manual.

The example from the previous posts:
    Again the data is converted to absolute scale first (Rankine, in
    this case) then added:
    25C + 1F = 536.67R + 469.67R = 997.34R = 537.67F

Get it?

--
Rouben Rostamian                          Telephone: (301) 455-2458
Department of Mathematics and Statistics  e-mail:
University of Maryland Baltimore County   bitnet: rostamian@umbc.bitnet
Baltimore, MD 21228,  U.S.A.              internet: rouben@math9.math.umbc.edu

akcs.dnickel@hpcvbbs.UUCP (Derek S. Nickel) (01/25/91)

Thomas,

Temperature addition is done on an abolute scale.  Your are adding 25
degrees Celcius to 1 degree Fahrenhiet (not 1 Fahrenhiet degree).

25_'C = 298.15_K
 1_'F = 255.927_K
adding these together gives:
554.077_K = 537.67_'F

OK?

        Derek S. Nickel

frank@grep.co.uk (Frank Wales) (01/25/91)

In article <2D042619A000047E@gacvx1.gac.edu> U5513172@NMSUVM1.BITNET 
 (Thomas L. Baca) writes:
>WhenI add 25_'C ( read degree Celcius)  and 1_'F
>on my HP 48SX, I get an answer of 537.67_'F.  What terribly simple thing
>am I overlooking? [...] Why is this happening? I've never seen a reference
>to this phenomenom, so I'm inclined to believe that the problem is not 
>really a problem.

[This has come up before, so probably deserves a mention in the FAQ posting.]

What you're encountering is a consequence of what it means to add
temperatures; in short, it means nothing.  You're attempting to add a
point on an absolute scale (degrees C) to another point on an absolute
scale (degrees F).  This has no physical meaning.  (Note: it would be
no more meaningful if both values were on the same scale.)  The units system
on the HP 48 tries to deliver an answer, and the answer comes about because
the 48 reduces both temperatures to the Kelvin scale, adds them, and
then converts the result to the units of the argument taken from level one.

See 'Adding and Subtracting Temperature Units' on page 201 in the
HP 48SX Owner's Manual [edition 4, July 1990], which basically gives the
same explanation, but without the statement: "P.S., this is meaningless."(*)

The current design of the units system doesn't accomodate the special needs
of things like temperature arithmetic; a full handling of this case would
need the existence of both degree_X units (where X is the temperature scale
of your choice) and X_degree units for representing absolute temperatures
and temperature differences respectively, as well as appropriate conversion
rules.  This may also impact other unit definitions (and could also be
used to implement weird things like units for C pointer arithmetic :-)).

If you need to perform temperature arithmetic, then the Equation Library
card functions TINC and TDELTA represent one way of handling this "problem".
-
(*) If you don't see why the operation is meaningless, imagine replacing
temperatures with dates (another absolute scale); now add January 12th, 1989
to August 28th, 1993.  What could the answer be?  And what could it mean?
--
Frank Wales, Grep Limited,             [frank@grep.co.uk<->uunet!grep!frank]
Kirkfields Business Centre, Kirk Lane, LEEDS, UK, LS19 7LX. (+44) 532 500303

Jake-S@cup.portal.com (Jake G Schwartz) (01/25/91)

The temperature conversion issue in the HP48 was explained rather well at 
last June's Chicago HP handheld user's conference by Bill Wickes and Eric
Vogel. The videotapes of that conference are still available, as usual.
We're up to 69 copies sent out at present.

Jake Schwartz

akcs.joehorn@hpcvbbs.UUCP (Joseph K. Horn) (01/25/91)

Lines: 13

Seems like the old "temperature bug" is being revisited.  For those of
you who didn't follow this thread shortly after the 48 came out, just
remember this:

If you have 75 degrees Fahrenheit, and you want to add 5 more degrees,
all you have to press is 75 F, 5 R, SWAP, +.

Similarly, if you want to do Celsius (Centigrade) arithmetic, make the
second number Kelvin, then swap and do whatever you wanna do.

This even makes sense, as per others' observations already posted.

--  Joseph K. Horn  --  (714) 858-0920  --  Peripheral Vision, Ltd. --

silvert@cs.dal.ca (Bill Silvert) (01/25/91)

In article <38439@cup.portal.com> Jake-S@cup.portal.com (Jake G Schwartz) writes:
>The temperature conversion issue in the HP48 was explained rather well at 
>last June's Chicago HP handheld user's conference by Bill Wickes and Eric
>Vogel. The videotapes of that conference are still available, as usual.
>We're up to 69 copies sent out at present.

Does it explain why 0C+0C=273.15C (this I understand, addition is in
absolute scale) but 2*0C=0C (why not convert to absolute first)?

The problem with this discrepancy is that it is not possible to average
two temperatures to find the midpoint unless you convert to a common
scale first.  I therefore feel that the inconsistency is a bug.

-- 
William Silvert, Habitat Ecology Division, Bedford Inst. of Oceanography
P. O. Box 1006, Dartmouth, Nova Scotia, CANADA B2Y 4A2.  Tel. (902)426-1577
UUCP=..!{uunet|watmath}!dalcs!biomel!bill
BITNET=bill%biomel%dalcs@dalac	InterNet=bill%biomel@cs.dal.ca

E7P2BAT%TOE.TOWSON.EDU@CUNYVM.CUNY.EDU (Harry E. Bates) (01/26/91)

Where can the video tapes of the Chicago HP handheld user's conference
be obtained?

Thanks!

Harry E. Bates
Towson State University
HBATES@TOWSONVX.BITNET

jsims@vuse.vanderbilt.edu (J. Robert Sims) (01/27/91)

Please note that all the temperature conversion behavior is documented in the
manual.  It clearly states that in cases of multiplication the additive offset
is ignored, and in cases of addition it adds the absolute temperatures.  The
conversions are quite logical, and behave as documented.  As someone mentioned
earlier, there should be a Celsius degree in addition to degrees Celsius.  
If you need the Celsius degree in your calculations, define a unit yourself.
1 Celcius degree = 1 Kelvin.  Simple as that.

0_^C + 0_^C = 273.15_^C
0_C^ + 0_^C = 0_^C

It's probably easier just to use the K directly.

My major complaint about the units management is its lack of support for 
fractional exponents and _its lack of documentation in the manual_.  I did find
brief mention of it in the EQ Lib card, however.  I spent hours trying to find
the problem with one of my programs, including a couple of calls to HP.  It
was a design decision to have this limitation, but it should have been in the
manual.

Rob
jsims@vuse.vanderbilt.edu

egraeler@uceng.UC.EDU (Eric S Graeler) (01/27/91)

In article <2D042619A000047E@gacvx1.gac.edu>, U5513172@NMSUVM1.BITNET (Thomas L. Baca) writes:
> Hello fellow HP-users,   I have what may be a silly question, but I
> shall ask anyway.  WhenI add 25_'C ( read degree Celcius)  and 1_'F
> on my HP 48SX, I get an answer of 537.67_'F.  What terribly simple thing
> am I overlooking?  My wife tells me that the answer looks like Rankins

There is nothing wrong with this.  This is perfectly correct.  What you are
over looking is absolute 0.  Temperature starts at 0_K which is equall to
-459.67_F.  Therefore 25_C is 298.15_K and 1_F is 255.93_K for a total of
554.08_K which is 537.67_F.  You can do these conversions easily by have the
number you want to convert on the stack and then press the left shift (orange)
and then the units you want.  

					Eric Graeler
					egraeler@uceng.uc.edu