Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!uunet!mcsun!ukc!mucs!logitek!grep!frank From: frank@grep.co.uk (Frank Wales) Newsgroups: comp.sys.handhelds Subject: Re: temperature conversion Message-ID: <1991Jan24.233320.940@grep.co.uk> Date: 24 Jan 91 23:33:20 GMT References: <2D042619A000047E@gacvx1.gac.edu> Reply-To: frank@grep.co.uk (Frank Wales) Organization: Grep Limited, LEEDS, UK Lines: 40 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