Open dpsanders opened 6 years ago
Do you mean something like that ?
julia> g(x::Interval) = x^2 - 2
g (generic function with 1 method)
julia> roots(g, -2..2)
ERROR: MethodError: no method matching g(::ForwardDiff.Dual{ForwardDiff.Tag{#g,IntervalArithmetic.Interval{Float64}},IntervalArithmetic.Interval{Float64},1})
I meant something like
julia> g(x) = x..x
g (generic function with 1 method)
julia> roots(g, -2..2)
ERROR: MethodError: no method matching atomic(::Type{IntervalArithmetic.Interval{IntervalArithmetic.Interval{Float64}}}, ::IntervalArithmetic.Interval{Float64})
Closest candidates are:
Is there an use case where this makes sense ? If the return value of g
is an interval I don't know how g(x) = 0
should be interpreted.
I've read somewhere that such cases occur and are of interest. Yet, in my opinion, we should perhaps document the current limitations and eventually add that functionality.
Also seems to be true of newton1d.
cc @eeshan9815