
Boost : 
Subject: Re: [boost] boost interval arithmetic
From: Marc Glisse (marc.glisse_at_[hidden])
Date: 20150115 12:14:07
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
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk