This is more like a question. I haven't found any information in the docs about handling branching while using InrervalArithmetic. For example
julia> using IntervalArithmetic
julia> f(x) = x > 1 ? x-1 : x
f (generic function with 1 method)
julia> f(0.9..1.1)
[0.899999, 1.10001] # expecting [0.0, 1.0]
julia> f.([0.9, 1.1])
2-element Vector{Float64}:
0.9
0.10000000000000009
The code produces an incorrect interval because 0.9..1.1 > 1 == false is valid only for part of the interval. Is there any way to handle such situations?
Btw, what about producing a warning?
This is more like a question. I haven't found any information in the docs about handling branching while using
InrervalArithmetic. For exampleThe code produces an incorrect interval because
0.9..1.1 > 1 == falseis valid only for part of the interval. Is there any way to handle such situations?Btw, what about producing a warning?