Boost logo

Boost :

From: Paul A Bristow (pbristow_at_[hidden])
Date: 2007-07-13 12:10:11

>-----Original Message-----
>From: boost-bounces_at_[hidden]
>[mailto:boost-bounces_at_[hidden]] On Behalf Of Marat Khalili
>Sent: 08 July 2007 19:07
>To: boost_at_[hidden]
>Subject: [boost] [rfc] Inexact quantities arithmetics

>I'm developing a library for working with inexact quantities, like
>(0.3162 +- 0.0079), in other words, for auto-estimating the propagation
>of errors in calculations. I plan to release it under Boost
>license when
>ready. Any comments (including sensibility of the whole project) are
<big snip>

This all looks most interesting, and would be a big step forward in handling uncertainty - but use of the word 'error' is now
so-last-millenium ;-)

Joking apart, this is a serious point

The word error gives off some very wrong vibes, and I would strongly urge you to change to using uncertainty instead of error,
despite the historial use of the word error. It *really, really* isn't an error - it is a interval of (un-)certainty.

You should also see

// Evan Manning (manning_at_[hidden])
// Evan Marshal Manning, C/C++ Users Journal, March 1996 page 29 to 38.
// original downloaded from
// This is a simple model of uncertainties, designed to
// accompany an article published in C/C++ Users Journal March 1996.
// A fuller collection of even fancier classes also given in UReal.h.

You will see from the full code that he templates two versions, one (unusual) where the uncertainties are correlated (must add up to
100%) - as well as the normal uncorrelated situation. Both are needed I think.

and FWIW some of my comments some years ago

I built my attempt without using Boost interval library, but you might be able to use it.

I also felt it was vital to store the degrees of freedom with the value and uncertainty, and I also added some other bits of
information like quantization (from A/D conversion), exact values, where the uncertainty estimate came from ...


Paul A Bristow
Prizet Farmhouse, Kendal, Cumbria UK LA8 8AB
+44 1539561830 & SMS, Mobile +44 7714 330204 & SMS

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