Boost logo

Boost :

From: George A. Heintzelman (georgeh_at_[hidden])
Date: 2001-10-08 08:38:19

Kevin Lynch wrote:
> "George A. Heintzelman" wrote:
> > No. Amount<> is not dimensionless.
> I would also agree that it doesn't make sense to take sin(number of
> apples), but that isn't a good argument for dimensionality, I don't
> think: it makes no sense to take sin(mass fraction) in most cases, but
> "mass fraction" is a dimensionless quantity in both the SI definition
> and my different definition. Furthermore, in some systems, like the
> natural units of particle physics, some quantities are dimensionless
> (for example, velocity) that would in SI be dimensionful.

Yes, but it makes sense in some contexts to take the sin of the
dimensionless velocity (or 2 pi times it, anyway). Mass fraction I
don't have a good argument for. It semes like another category of the
clearly dimensionless stuff; it makes sense to multiply a dimensionful
quantity by a mass fraction or other ratio, and get another
smae-dimensioned quantity. I don't think this will usually hold for
number of apples.

> But I'm perfectly happy to accept the SI definition going forward from
> here, because I don't think dimensionful/dimensionless is going to be a
> useful distinction for building a unit framework for C++.
> > Angles, binomial coefficients, and such are examples of truly
> > dimensionless numbers.
> I think we need to be more careful. Binomial coefficients (and other
> constants such as the Bernoulli numbers, pi, e, etc...) are not only
> dimensionless (by any reasonable definition); they are pure numbers; no
> units can are attached. Angles may or may not be different.

Hrm. I think I see what you're saying here, but I'll have to think
about it a little more.

> > I still think something needs to address the
> > difference between an angle and other dimensionless units, but that's a
> > different question.
> I'll give it a shot. I'm not attached to this description, so if you
> have another approach feel free to convince me :-)
> "angular units" are not units in the sense that length and time units
> are "units"; I will go so far as to say that, in the language that I've
> been using, the names of "angular units" are just "tags" on pure
> numbers, not actual units. In the SI, we have the radian as an "angular
> uit", but it is a special case, and isn't like any other unit in the SI:
> "when one expresses the values of derived quantities involving plane
> angle or solid angle, it often aids understanding if the special names
> (or symbols) "radian" (rad) or
> "steradian" (sr) are used in place of the number 1."
> But, radian can't really be 1! It can't be, because that would imply
> that degree and grad are also 1.

No, it wouldn't. It would imply that 'degree' = pi/180, and 'grad' =
pi/200 (both dimensionless numbers). So I think this is all a
consistent picture, but I'm still not sure I'm entirely sure whether
this is the right way to encode this in a C++ library. Walter's 'Views'
in SIUnits or something similar might be a better way to deal with it.

> So, in summary, I am willing to accept Amount<> as dimensionful, and I
> think it is better to not call angular measure a unit, since it violates
> the algorithmic rules for units, but not the algorithm for tags. Or so
> I think now.

I think this is right, though I want to see how an actual
implementation plays out. Time to go to work! I'm going to see if I can
play a little with SIUnits and get something that does what we are
talking about integrated with it.

George Heintzelman

Boost list run by bdawes at, gregod at, cpdaniel at, john at