JuliaIntervals / IntervalRootFinding.jl

Library for finding the roots of a function using interval arithmetic
https://juliaintervals.github.io/IntervalRootFinding.jl/
Other
125 stars 26 forks source link

Graceful handling of infinity #161

Open dpsanders opened 3 years ago

dpsanders commented 3 years ago

Currently the following hangs in an infinite calculation:


julia> using IntervalArithmetic, IntervalRootFinding

julia> roots(x -> x^2 - x, -Inf..Inf)

since it cannot prove that it can exclude the regions at infinity.

We should explicitly check for infinite intervals and stop bisecting at some point, say when the result is above 1e200.

KronosTheLate commented 3 years ago

I don't have anything to contribute with in terms of solutions, but as a user, being able to check from -Inf to Inf is what I actually want to do most of the time, and so this would be a great feature.