15 Jan
2015
15 Jan
'15
5:14 p.m.
On Thu, 15 Jan 2015, Asbjørn wrote:
On 15.01.2015 15:01, Павел Кудан wrote:
Now see:
[-1.0, 1.0] / .0
What is the correct result? Of course, [-inf, inf]
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.
For IEEE double, 1./0 is well defined as +inf, and -1./0 as -inf, so I agree that returning an empty set (apparently creating an empty set throws, with the default policy) is questionable, it depends on your application whether you want empty or [-inf,+inf]. I did not check if boost provides a policy to change that behavior. -- Marc Glisse