Closed tpapp closed 7 years ago
A related issue is log(Interval(0.0))
. I wonder if the ≤
here is necessary, and whether <
would be OK.
I believe that these results are mandated by the IEEE 1788 standard document that we (are trying to) follow in the package. Basically, as far as I understand, ∞ is not thought of as a real number, and so intervals like [∞, ∞] are not allowed. (They contain no real number, and so are empty.) cc @lbenet who has studied the standard more carefully.
Regarding this:
julia> i = 1..1
[1, 1]
julia> i/(1-i)
∅
as @dpsanders explained, the idea is to think the result as the set on real numbers which multiplied by the interval 1-i = Interval(0,0)
yields the interval i=Interval(1,1)
. Since there is no number (nor interval) yielding this, the result must be the empty interval. The same happens with the log
. Note that this is due to the fact that 1-i
is identical to the (thin) interval Interval(0,0)
; if you use i=0.5..1.5
you get Interval(-Inf,Inf)
as you expected.
Since I don't think there's anything we can do here, I'm going to close this.
I expected
∞..∞
for the last expression, but I may have missed some detail.