[comp.sys.handhelds] Unit Puzzle

sburke@jarthur.Claremont.EDU (Scott Burke) (02/27/91)

Hi.

Here's a difficult unit management problem, if anyone's got an urge to bang
their head against a wall for a while...  ;-)

Take the equation dT = k * M , where dT is a temperature increment, k is
some constant, and M is a molality.  Thus, the units of dT are temperature,
of k are temperature*kg/mol, and of M are mol/kg.

Allow the temperature parts of k and dT to be anything--C, K, F, or R.
Now, put in a value for k and M, and use ROOT to solve for dT.

(To do this, put 'dT=k*M' in level 3, 'dT' in level2, and a guess (say, 0_K)
in level 1; then type ROOT.  Make sure the values of k, M, and dT are stored
in the current directory with the right units first.)

The puzzle?  Figure out how to always get the right answer, regardless of
whether dT and k have temperature components in C, K, F, or R.  Note that
it should also be allowed that the temperatures don't have to be the same
units.

What I've run up against is the painful reality that 1_C doesn't always equal
1_C, if one is a temperature _increment_ and the other a temperature _value_.

I've been hacking on is a while, and the answer I'm looking for is just the
correct equation to use.  It will probably have a UBASE or two.  It may also
have a custom function (like TDELTA or TINC in the HP EqLib Card), but I'm
not sure.  I am sure that I wouldn't mind a couple new ideas from some 
other viewpoints.

Thanks.  E-mail me or post if you get anywhere.

Scott.
sburke@jarthur.claremont.edu