Peter Vanbroekhoven wrote: / ... >> 3. Facet Units doesn't seem to do temperature conversions. Maybe it >> does, but I can't find any documentation on it. > > It doesn't as temperature conversions are ill-defined. No, actually, temperature conversions are perfectly well-defined. Unfortunately, absolute temperature conversions require two mathematical operations instead of one (a multiplier and an offset), which sets them apart from nearly all other conversions. It even sets them apart from temperature differential conversions. > As you know, > both absolute temperatures and temperature differences have the same > unit. Any operation on two temperatures expressed in different units > cannot be correct for absolute temperatures and temperature > differences. That is because converting a temperature differential is not the same as converting a temperature. But each of the operations is clearly defined. > This is an inherent problem, so we had three choices: do > no conversions, use the conversion for absolute temperatures, or use > the conversion for temperature differences. There is a third choice -- convert temperatures and temperature differentials separately. Name one absolute temperatures, and the other delta-t or something similar. It is basically a Calculus issue. You may know that taking a differential (or a derivative) involves the loss of information, and when the converse operation (integration, a term only loosely applicable here) is performed, a constant (usually unknown) is included to remind the practitioner about the lost information. In the same way, moving from a temperature to a differential of temperature loses information, so the reciprocal operation (difference to absolute) must be carefully handled (when it can be performed at all). Someone versed in Calculus wouldn't think of mixing functions and their derivatives without being vigilant that they represent different things. The temperature conversion problem should be looked on in the same way. > We chose the first of > these three. We're open to additional ideas on this. Well, this is just something to think about. I've written a lot of unit conversion routines over the years and I haven't considered handling temperatures and temperature differentials separately, but it's an obvious solution. I just noticed something. The Linux utility "units" handles both temperature and temperature differences, and they are distinguished by syntax: $ units "tempC(0)" tempF # absolute temperature 32 $ units "32 degF" degC # temperature difference * 17.777778 / 0.05625 So it seems it has been done. -- Paul Lutus http://www.arachnoid.com