Typing units correctly

Tom Pledger Tom.Pledger@peace.com
Tue, 13 Feb 2001 09:59:37 +1300

Dylan Thurston writes:
 | Any such system would probably not be able to type (^), since the
 | output type depends on the exponent.  I think that is acceptable.

In other words, the first argument to (^) would have to be
dimensionless?  I agree.  So would the arguments to trig functions,

Ashley Yakeley writes:
 | Very occasionally non-integer or 'fractal' exponents of dimensions
 | are useful. For instance, geographic coastlines can be measured in
 | km ^ n, where 1 <= n < 2. This doesn't stop the CIA world factbook
 | listing all coastline lengths in straight kilometres, however.

David Barton writes:
 | Even without fractals, there are cases where weird dimensions come
 | up (I ran across this in my old MHDL (microwave) days).  Square
 | root volts is the example that was constantly thrown in my face.

In both of those cases, the apparent non-integer dimension is
accompanied by a particular unit (km, V).  So, could they equally well
be handled by stripping away the units and exponentiating a
dimensionless number?  For example:

    (x / 1V) ^ y