Closed dpsanders closed 5 years ago
Consider the following example from Hickey 1997 (in the notation of this package):
julia> x = -1..5 [-1, 5] julia> y = -1..1 [-1, 1] julia> z = 2..10 [2, 10] julia> result = mul_rev(z, x, y) ([2, 10], [-1, 5], [-1, 1])
However, in fact it's possible to show that the result for x and y should be
x
y
(2..10, 0.4..1, 2..5)
(and z should be 2..5).
z
2..5
This can be obtained by splitting up x and y into positive and negative parts and then taking the hull:
julia> x .∩ extended_div(z, y) (∅, [2, 5]) julia> union( (x .∩ extended_div(z, y))...) [2, 5] julia> union( (y .∩ extended_div(z, x))...) [0.4, 1]
According to Hickey, it's necessary to separate out 0 for separate treatment.?
0
Consider the following example from Hickey 1997 (in the notation of this package):
However, in fact it's possible to show that the result for
x
andy
should be(and
z
should be2..5
).This can be obtained by splitting up
x
andy
into positive and negative parts and then taking the hull: