Kevin Olbrich wrote: > After thinking about this a bit, here are a few things that might be > handy. > > 1. Temperature is not a unit, it's a property that is measured in degrees. In physics, degrees of temperature really are units, in the same way that Ergs and Newtons are. The problem is that there are two sizes of degrees: K/C and F/R. In physics you can compute a temperature change to a fare-thee-well if you know the volume of a substance and the energy gained or lost. And the initial and final values are normally expressed in absolute degrees. In the final analysis, the initial and final temperatures might be expressed in any of the four common scales (Kelvin, Centigrade, Fahrenheit, Rankine). > 2. That measurement is always relative to a fixed value, so really all > temperature values are differences Not really. The majority of temperature conversions are from one absolute scale to another, as in Kelvins to Celsius as a very common example. Delta-t conversion is the minor activity. Even when a term is expressed as a delta-t, someone will ask for a conversion to absolute degrees at some point. > 3. The number of real calculations in which you would want to use the > absolute temperature instead of some delta of temperature is exceedingly > small. No again. Not to argue, but this just isn't correct. In physics and in particular in student work, solving problems that involve a certain quantity of a substance and an energy gain and loss, with a resulting temperature often expressed in absolute degrees, are quite common. > Consequently, the approach I am currently taking is to > * represent all temperatures as differences. > * provide a helper function that does the conversion from one > temperature scale to another for those times when you really need it. > * document the heck out of this > > So far it seems to work pretty well Oh, well, it's code, it can easily be modified later on. -- Paul Lutus http://www.arachnoid.com