From: Matthias Troyer (troyer_at_[hidden])
Date: 2006-08-24 00:17:09
On Aug 24, 2006, at 1:23 AM, Eric Lemings wrote:
>> -----Original Message-----
>> From: boost-bounces_at_[hidden]
>> [mailto:boost-bounces_at_[hidden]] On Behalf Of Phil Richards
>> Sent: Wednesday, August 23, 2006 8:58 AM
>> To: boost_at_[hidden]
>> Subject: Re: [boost] Boost Units library preview
>> On 2006-08-23, Matthias Troyer <troyer_at_[hidden]> wrote:
>>> - Nm would be a "dimension"
>> Not really. It is the unit.
> Correct. A newton is a derived unit composed of base units,
> specifically kilogram, meter, and second. Meter is of course a
> base unit.
>> The dimension is: MASS * LENGTH^2 * TIME^2
> Also correct. Every unit, whether a base unit or derived, has a
> corresponding dimension.
>>> - 1 Nm would be a "quantity"
> No. This is a measure. It has a specific unit and a specific
> Here's an example of a quantity. The distance from
> here->| |<-to here is a quantity with a
> dimension of length. You don't know what its value is exactly
> but you do know that it has a value and can be measured. Until
> you actually measure this length with a particular unit does the
> "quantity" become a "measure". Converting a measure into a
> quantity is essentially the same as stripping away the unit but
> keeping the dimension.
OK, but then a quantity can never be represented in the computer,
since to assign a numerical value to above distance one needs a unit.
>>> - a torque measured in Nm or an energy measured in Nm
>> would be two distinct units
> Dimensions and units are C++ types. They have no "value" in
> the conventional sense.
OK, so would the type of "Nm torque" or "Nm energy" be the same or
>>> - 1 Nm as torque, 1 Nm as energy or 1 J as energy would be
>>> three distinct measures
>> I think as far as a dimensionality checking goes, they are
>> all the same. As far as a units checking goes, Nm and J
>> *could* be distinguished. It's an interesting question as to
>> what, exactly, "energy" and "torque" are once you try to
>> separate away the dimensionality and units bits... :-)
> Yep, if the units are the same and the value is the same then
> they are (or should be) considered the same measure. I think
> it should be left up to users to interpret these measures and
> how they are used.
Well, as a physicist for me 1 J and 1 Nm are the same. I would reject
and never use a library that forces me to distinguish physically
identical quantities just because I use a different name for the unit.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk