Closed pkofod closed 5 years ago
Thanks for the report.
find_roots_midpoint
is part of the old API and will probably disappear.
For the moment you can use
rts = roots(f, -5..5)
mid.([rt.interval for rt in rts]) # edited for correct syntax
Later you will be able to do
mid.(interval.(rts))
Nonetheless, the original idea of find_roots_midpoint
was to have an API in which the user did not need to know anything at all about intervals. Probably we should strive to maintain such an API available?
Either way is fine to me!
Later you will be able to do
does that mean "on master" or "yet to be implemented" ? :)
I thought it was a PR, but actually it works on master!
julia> using IntervalRootFinding
INFO: Precompiling module IntervalRootFinding.
julia> rts = roots(x->x^2 - 2, -5..5)
mi2-element Array{IntervalRootFinding.Root{IntervalArithmetic.Interval{Float64}},1}:
d. Root([1.41421, 1.41422], :unique)
Root([-1.41422, -1.41421], :unique)
julia> mid.(interval.(rts))
2-element Array{Float64,1}:
1.41421
-1.41421
Great! Will continue my interval endeavors then!
This part of the API is no longer in use.
It shouldn't throw an error, but return an empty result. Or error with a better error :)