
Boost : 
Subject: Re: [boost] boost interval arithmetic
From: ÐŸÐ°Ð²ÐµÐ» ÐšÑƒÐ´Ð°Ð½ (coodan_at_[hidden])
Date: 20150115 10:21:42
>The way I understand interval arithmetics, the result is the set
>{x / 0 for all x in [1, 1]}.
>
>Now, x/0 is undefined for all x in [1, 1], so returning an empty set seems
>logical to me.
Yes, there is my mistake and misconception on this question, please, see in parallel message.
To be exact, 0.0/0.0 (sorry for misleading short forms of numbers in example, which looks as int values, as first aim of boost class is float numerics) is NaN for C++ standard. So, [1.0, 1] / [0.0, 0.0] could be also NaN.
Â
But IEEE Interval Standard Working Group decides to have it as an empty set.
So, you are right, and authors of boost interval are right in this question.
As same standard group suggests silent return of [inf, inf] as one of possible results of [1, 2] / [1, 0] operation, I must confess that my statement that it is misconception was also not true, as like we or not some implementation decision, if it is supported by standand (although is one of its options), it is only implementation decision, which should be known to user in whole details and its possible drawbacks must be just taken into account basing on detailed documentation.
As for me, I will prefer to use my own simple interval class over boost interval until the time when interval arithmetic in some finished manner will be included into C++ standard and documented.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk