Boost logo

Boost :

Subject: Re: [boost] boost interval arithmetic
From: Павел Кудан (coodan_at_[hidden])
Date: 2015-01-15 10:39:07


Thu, 15 Jan 2015 15:40:22 +0100 от Thijs van den Berg <thijs_at_[hidden]>:
>On Thu, Jan 15, 2015 at 3:18 PM, Павел Кудан < coodan_at_[hidden] > wrote:
>
>> What kind of arguments you would like after all?
>>
>> Do you really want to discuss misconception of the mathematical class it
>> it's misconcepted terms?!
>>
>> No, that's irrelvant, we need to stick to the definitions of interval that
>boost interval claims to use, and discuss if the code adheres to those
>specs. I.e. way library users will expect and rely upon.
>
>Generic set theoretical discussions are off-topic imo.
>
>Ideally you'd post C++ code and show that it doesn't do what you expected
>based on the documentation, and not based on what you incorrectly think
>boost interval should be (a set algebra lib)

Not a set. Just 'certain' interval calculation with certain results. If result is single interval - return. If not - throw as it is not certain. That is simple.

But you are right that it is not misconception of boost interval class, that is details of implementation, and, so, it is mine misconception.

At least, IEEE Interval Standard Working Group lets developers to silently return [-inf, inf] in similar situations as one of multiple possible variants. These one is not best one for my taste, but it exists. Let's see what will be in final standard revision.

I am still disagree with practice when functions silently return subset of result instead of true result, as it is bad practice. Very difficult to locate and debug. Till the moment interval calculation will be included in some form into C++ standard, I will prefer for basic interval operations my own simple interval class over boost's one. It may be naive and uses containers to return all results of native interval operation, but I do not see any problem in this approach.


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