Boost logo

Boost :

From: Noah Roberts (roberts.noah_at_[hidden])
Date: 2007-03-05 18:22:09

Dave Steffen wrote:

> Voice from the back of the room:
> a) It might be handy, though, to have (for example) a log function
> that enforces unitless quantities. For example,
> log ( velocity * time / meters )
> is fine, but if you forget to multiply by the time, you get a
> helpful error message.

There's just plain going to be times when you have to break out of the
dim/unit analysis model. For instance, in fluid flow analysis, what I
do, you often have empirical is not at all
uncommon to take a quantity to some variable power that might itself be
a quantity. There's no way to enforce dimensions on this. You have to
break out and go back in and watch carefully what you are doing in these
parts of the code. Wrap functions with quantities and do what you have
to...just because the function works outside of dimensions doesn't mean
it can't accept and return statically dimensioned values...we know what
goes in and what comes out.

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