Boost logo

Boost :

From: Deane Yang (deane_yang_at_[hidden])
Date: 2004-01-11 13:56:16


Phil Richards wrote:
> On Fri, 09 Jan 2004 15:32:48 -0500, Deane Yang wrote:
>
>>But it's getting really confusing whether this is the dimensions part or
>>the units part (I am capable of arguing either side).
>
>
> This was the point of my original post: you can have units library without
> dimensional analysis, but it is practically useless for a lot of
> applications - pretty much any application that requires combining
> different units "correctly", in fact.
>
> If you want a units library that does the "right thing" when you divide
> energy by time, you need dimensional analysis support - as has been
> posted elsewhere, all current example libraries do this.
>
> phil

You have a different definition of a "units" library than I do.
The units library I have in mind automatically derives the correct
output units from the input units. So if you divide meters by seconds,
you get a derived unit corresponding to meters per second.
In other words, dimensional analysis IS used to figure out the right units.

The downside of this, for physicists, is that the derived units are
completely determined by the fundamental units, so it will not conform
to man-made conventions like SI. But I would argue that an SI library
can be built on top of the basic units library as described above.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk