From: Herve Bronnimann (hbr_at_[hidden])
Date: 2002-09-06 21:39:20
On Fri, Sep 06, 2002 at 09:44:21PM -0400, David Bergman wrote:
> Is the primary usage of these intervals to control roundoff errors? That
> sounds a bit limiting, I thought this was supposed to be a generic
> library to do math with intervals.
The primary usage (why many people use intervals) is indeed to control
roundoff errors (what you could call `small intervals').
However, if you
recall from reading the documentation, we wanted to allow other uses
such as computations with large intervals, with or without guaranteed
inclusion property. E.g. people in computer graphics care little about
it, they use interval methods to compute space subdvisions and have
tremendous need for speed and none for accuracy (because floating double
accuracy is enough for them).
It's really trying to provide a library for small intervals and large
intervals at the same time that forces the policy design, because of the
variability in usage.
Although if you read Doug Gregor's resolution proposal, you may agree
with him that policies could be replaced by namespace semantics. I
wasn't aware of that design choice. We'll certainly take a long look at
> Hypothetically, if that was the prime purpose, then the only sensible
> choice for ordering would be "shorter than", which would only be defined
> for at least overlapping intervals.
No, the sensible choice is one that extends the order on T, because as
was mentioned in other messages, interval<T> is suppose to replace T in
generic programs (generic as in: with a template number type). Such an
Although if the goal is to compute the best interval for roundoff
approximation, then the subset inclusion order (the one chosen in
Profil/BIAS) is also meaningful.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk