Boost logo

Boost :

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

 On the other hand, if 0/0 is NaN for C++ standard, then the result of [-1, 1] / [0,0] should be NaN interval as well, as we have [-inf, NaN] U [Nan, inf] as a result. Which is NaN...

But IEEE Interval Standard Working Group - P1788 specifies that only empty set can be a result in that case...

So [-1, 1] / [0,0] IS EMPTY is only standard way to do this... Although there is some conflict with 0/0 is NaN standard here.

Interestingly, that same standard does not specify what to do in situation when distinct intervals is a result of operation. Silently return [-inf, inf] is one of possible variants, but not the single.

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