Boost logo

Boost :

From: David Bergman (davidb_at_[hidden])
Date: 2002-09-06 20:44:21


Ouch,

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.

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. NOTE: I am not suggesting this
order, just trying to estimate plausible orderings according to Sylvain.
That would actually be the opposite to what was suggested before by the
authors: the "completely to the left" relation.

Such an ordering, being one of the few plausible orderings for the
round-off purpose, could then be defined as (I know some people are
allergic to "iff" in definitions...) :

        [a1, a2] < [b1, b2] iff a2 >= b1 && |b1 - b2| < |a1 - a2|

You would then have '<' mean "less precise than", which would serve the
round-off purpose, but would not be total and therefore not suitable as
a "key ordering" for STL and alike.

Again: I am *not* proposing this as the default order (i.e., '<'), but
is this not the "natural" order Sylvain is looking for?

/David

-----Original Message-----
From: boost-bounces_at_[hidden]
[mailto:boost-bounces_at_[hidden]] On Behalf Of Sylvain Pion
Sent: Friday, September 06, 2002 4:57 PM
To: boost_at_[hidden]
Subject: Re: [boost] Interval Library and comparison operators

On Fri, Sep 06, 2002 at 09:25:32PM +0200, Gabriel Dos Reis wrote:
> | But there will be no _default_ order, because there is no suitable
> | default !
>
> No suitable default for *exactly what*?

Suitable for the _primary_ usage of intervals, i.e. controlling roundoff
errors, not serving as keys in ordered containers.

People say it's no good to have std::less different from operator<, so
it should be the same. Your suggested lexicographic order as default is
senseless for the primary usage.

-- 
Sylvain
_______________________________________________
Unsubscribe & other changes:
http://lists.boost.org/mailman/listinfo.cgi/boost

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