Boost logo

Boost :

From: Paul A. Bristow (boost_at_[hidden])
Date: 2003-11-05 13:09:18


| -----Original Message-----
| From: boost-bounces_at_[hidden]
| [mailto:boost-bounces_at_[hidden]]On Behalf Of Geoff Leyland
| Sent: Tuesday, November 04, 2003 9:23 PM
| To: Boost list
| Subject: Re: [boost] Yet Another Units Library

| A long time ago I also implemented a dimensions and units library that
| was principally for run-time checking.
| This isn't useful for much of the code, as dimension checking at
| run-time has quite an overhead, it was to deal with outputting and
| particularly inputting quantities with dimensions and units.
|
| Like what Mattias suggested, the concepts of "dimension" (M, L, T,
| luminance...) were separate from units (feet, metres...) and a
| dimensioned quantity.
|
| The code is pretty old, and contains strange "optimisations" that I
| needed to get the compiler of the time to eat it,

:-(

Thankfully, the nightmare of endless fixes to suit compilers is fading, but
still not gone.

<bit snip>

| If anyone wants to have a look at the code I'd be more than happy do
| dig it out and send it to them (I don't have a server I can easily put
| it on at the moment).

Suggest you post in the files area. This will expose it to view at least.

| I'm not sure that it would be much use, given
| its age, and that I'm not sure when I'll find time to work on it, but I
| do think that having an integrated run-time (ie i/o) and compile time
| units and dimension checking system would be great.

We were really looking for someone to do the work ;-)

|
| On another note, it seems to me that uncertainty propagation is a
| completely separate issue from dimensions and units (though a no less
| interesting one). I can't think of many cases though where you're not
| going to end up needing monte-carlo simulation or importance sampling
| for anything but very restrictive assumptions.

Agreed but the ISO GUM Guide to expression of uncertainty in measurement (1995)
(and many other sources) is a useful guide to current thinking on expressing,
and propagating, uncertainty in all sorts of measurements, and uses fairly
simple and well known 'very restrictive assumptions' statistical rules for
propagation. It is accepted that these are only an approximation but seem to be
acceptable and useful, and standardised.

code by Evan Manning (manning_at_[hidden])
Evan Marshal Manning C/C++ Users Journal, March 1996 page 29 to 38.
 ftp://beowulf.jpl.nasa.gov/pub/manning

is an example of using these 'simple' 'rules'.

One would not want to require use of uncertainty handling of course, but I
believe that any dimensions and units package must also 'party' with an
uncertainty package.

Paul

Paul A Bristow, Prizet Farmhouse, Kendal, Cumbria, LA8 8AB UK
+44 1539 561830 Mobile +44 7714 33 02 04
mailto:pbristow_at_[hidden]


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