Boost logo

Boost :

From: Jens Maurer (jmaurer_at_[hidden])
Date: 2000-03-03 10:05:19

While trying to improve the random number library, especially
the various non-uniform distribution functions, I decided that
I needed a tool to analyze the quantization effects of various

After thinking a bit further, I started to write a class for
interval (or "range") arithmetic. I've uploaded it to
the boost egroups docvault at
(there's also a .zip file with everything in it).

The basic idea is that you don't represent real numbers by single
machine values, but instead by an interval which contains the
real number. After defining suitable arithmetic operators,
you can guarantee that the intervals in your calculation always
contain the "true" value. Thus, you get a worst-case estimate
for the accumulated error in your calculation, for the price of
twice the number of basic arithmetic operations executed.

I consider interval arithmetic a very useful validation tool for
complicated computations if theoretical error propagation
analyses are not available.

I've included basic operators +,-,*,/ as well as exponential,
logarithmic, trigonometric, and hyperbolic functions.

Implementation note: For interval arithmetic, we need detailed
rounding mode control. I've abstracted this into a separate,
possibly platform-dependent class "rounding_control".
Implementations for ISO C99 and Linux platforms are provided.

Please comment.

Jens Maurer.

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