15 Jan
2015
15 Jan
'15
3:03 p.m.
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... http://grouper.ieee.org/groups/1788/PositionPapers/ArithOp2.pdf 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.