Boost logo

Boost :

Subject: Re: [boost] boost interval arithmetic
From: Thijs van den Berg (thijs_at_[hidden])
Date: 2015-01-15 06:03:13

On Thu, Jan 15, 2015 at 11:44 AM, Павел Кудан <coodan_at_[hidden]> wrote:

> >That's not what the defintion that boost uses, boost gives you the
> >smallest single interval in which the value will be. You are sugesting a
> >"multi-interval".
> Not completely true.
> I just suggest that arithmetic function does not return not correct
> results. And throw exception in the case when single interval cannot be
> returned - in same manner with boost interval comparison operators (default
> behaviour) in similar intermediate situation. To let user know that result
> is incorrect and he may use 'native' interval boost class functions
> (divide_part1(), divide_part2() in this case) to get correct result, as
> operator is not applicable to such situation any more.
But it *can* return a single interval. Always. And that's the correct
result given the definition being used: a single interval that encapsulated
the value. You are looking for a different definition, one of many possible

Comparison is different, you can't always return True or False when there
is partial overlap of intervals.
You can however have various comparison definitions that *do* result in
always True or False, e.g. the comparison "guaranteed to be be
*always* smaller".

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