diff --git a/NEWS.md b/NEWS.md index 400c5a7..0d668aa 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,18 @@ # Updates to `IntervalRootFinding.jl` +## v0.7 + +This release is expected to be the last release before v1.0. + +The only breaking change is that the Krawczyck contractor is now the default. + +### New features since v0.6.0 +- Requires IntervalArithmetic v1.0. +- The root search continues on inconclusive boolean operations #233 +- The iterator interface has been greatly improve #241 +- `maxiter` and `reltol` stop criterion #211 +- A lot of tests + ## v0.6 Compatibility with IntervalArithmetic v0.22, which fundamentally changes the package. diff --git a/Project.toml b/Project.toml index 56ce07f..3feb117 100644 --- a/Project.toml +++ b/Project.toml @@ -1,6 +1,6 @@ name = "IntervalRootFinding" uuid = "d2bf35a9-74e0-55ec-b149-d360ff49b807" -version = "0.6.3" +version = "0.7.0" [deps] BranchAndPrune = "d3bc4f2e-91e6-11e9-365e-cd067da536ce" diff --git a/docs/src/index.md b/docs/src/index.md index e48876d..f507977 100644 --- a/docs/src/index.md +++ b/docs/src/index.md @@ -28,7 +28,7 @@ julia> using IntervalArithmetic, IntervalArithmetic.Symbols, IntervalRootFinding julia> rts = roots(x -> x^2 - 2x, 0..10) 2-element Vector{Root{Interval{Float64}}}: - Root([0.0, 3.73848e-8]_com_NG, :unknown) + Root([0.0, 3.7395e-8]_com_NG, :unknown) Root([2.0, 2.0]_com_NG, :unique) ``` @@ -70,8 +70,8 @@ g (generic function with 1 method) julia> roots(g, -10..10) 4-element Vector{Root{Interval{Float64}}}: Root([-1.73205, -1.73205]_com_NG, :unique) - Root([-1.41421, -1.41421]_com, :unknown) - Root([1.41421, 1.41421]_com, :unknown) + Root([-1.41421, -1.41421]_com_NG, :unknown) + Root([1.41421, 1.41421]_com_NG, :unknown) Root([1.73205, 1.73205]_com_NG, :unique) ``` diff --git a/docs/src/internals.md b/docs/src/internals.md index 1e7897f..ca95d54 100644 --- a/docs/src/internals.md +++ b/docs/src/internals.md @@ -79,7 +79,7 @@ f (generic function with 1 method) julia> problem = RootProblem(f, interval(-10, 10)) RootProblem - Contractor: Newton + Contractor: Krawczyk Function: f Search region: [-10.0, 10.0]_com Search order: BreadthFirst diff --git a/docs/src/roots.md b/docs/src/roots.md index e944133..ccf532e 100644 --- a/docs/src/roots.md +++ b/docs/src/roots.md @@ -75,8 +75,8 @@ df (generic function with 1 method) julia> roots(f, [-3..3, -3..3] ; derivative = df) 2-element Vector{Root{Vector{Interval{Float64}}}}: - Root(Interval{Float64}[[-1.28378e-21, 1.58819e-22]_com_NG, [-1.5708, -1.5708]_com_NG], :unique) - Root(Interval{Float64}[[-1.28378e-21, 1.58819e-22]_com_NG, [1.5708, 1.5708]_com_NG], :unique) + Root(Interval{Float64}[[-3.93241e-20, 3.93241e-20]_com_NG, [-1.5708, -1.5708]_com_NG], :unique) + Root(Interval{Float64}[[-3.93241e-20, 3.93241e-20]_com_NG, [1.5708, 1.5708]_com_NG], :unique) ``` ## Tolerance @@ -94,8 +94,8 @@ julia> roots(g, 0..2) julia> roots(g, 0..2 ; abstol = 1e-1) 2-element Vector{Root{Interval{Float64}}}: - Root([1.14173, 1.15244]_com, :unique) - Root([1.78757, 1.84272]_com, :unique) + Root([1.1205, 1.16994]_com, :unique) + Root([1.8237, 1.85206]_com, :unique) ``` A lower tolerance may greatly reduce the computation time, at the cost of an increased number of returned roots having `:unknown` status: diff --git a/src/roots.jl b/src/roots.jl index c348692..872f803 100644 --- a/src/roots.jl +++ b/src/roots.jl @@ -74,7 +74,7 @@ end function RootProblem( f, root::Root ; - contractor = Newton, + contractor = Krawczyk, derivative = nothing, search_order = BreadthFirst, abstol = 1e-7, @@ -230,7 +230,7 @@ function roots(f, region ; kwargs...) end # Acting on complex `Interval` -function roots(f, region::Complex{<:Interval} ; derivative = nothing, contractor = Newton, kwargs...) +function roots(f, region::Complex{<:Interval} ; derivative = nothing, contractor = Krawczyk, kwargs...) g = realify(f) X = [real(region), imag(region)]