From 00378d20c60ff347a8cbf0480d7c44b84195fe06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Richard?= Date: Mon, 11 May 2026 22:37:42 +0200 Subject: [PATCH 1/3] Prepare v0.7 release --- NEWS.md | 13 +++++++++++++ Project.toml | 2 +- src/roots.jl | 4 ++-- 3 files changed, 16 insertions(+), 3 deletions(-) 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 8ab743c..86ae765 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/src/roots.jl b/src/roots.jl index 1762ff7..5c81aff 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, @@ -229,7 +229,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)] From ae2af144b89b71f9689b23f399800eaee84874cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Richard?= Date: Tue, 12 May 2026 10:18:14 +0200 Subject: [PATCH 2/3] Fix doctests --- docs/src/index.md | 6 +++--- docs/src/internals.md | 2 +- docs/src/roots.md | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/src/index.md b/docs/src/index.md index e2216ef..b455235 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) Not converged: region size smaller than the tolerance Root([2.0, 2.0]_com_NG, :unique) ``` @@ -71,9 +71,9 @@ 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_NG, :unknown) Not converged: region size smaller than the tolerance - Root([1.41421, 1.41421]_com, :unknown) + Root([1.41421, 1.41421]_com_NG, :unknown) Not converged: region size smaller than the tolerance Root([1.73205, 1.73205]_com_NG, :unique) ``` diff --git a/docs/src/internals.md b/docs/src/internals.md index ae9f50f..84d4611 100644 --- a/docs/src/internals.md +++ b/docs/src/internals.md @@ -68,7 +68,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: BranchAndPrune.BreadthFirst diff --git a/docs/src/roots.md b/docs/src/roots.md index eabd65d..e775e00 100644 --- a/docs/src/roots.md +++ b/docs/src/roots.md @@ -76,8 +76,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 @@ -95,8 +95,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: From cd7e5b5e36dd70e0f919aa78d25b5b290d2d03f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Richard?= Date: Tue, 12 May 2026 10:31:01 +0200 Subject: [PATCH 3/3] Fix some things that were missed --- docs/src/index.md | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/docs/src/index.md b/docs/src/index.md index 91f4810..f507977 100644 --- a/docs/src/index.md +++ b/docs/src/index.md @@ -28,12 +28,7 @@ julia> using IntervalArithmetic, IntervalArithmetic.Symbols, IntervalRootFinding julia> rts = roots(x -> x^2 - 2x, 0..10) 2-element Vector{Root{Interval{Float64}}}: -<<<<<<< prepare_v1.0 Root([0.0, 3.7395e-8]_com_NG, :unknown) - Not converged: region size smaller than the tolerance -======= - Root([0.0, 3.73848e-8]_com_NG, :unknown) ->>>>>>> master Root([2.0, 2.0]_com_NG, :unique) ``` @@ -75,15 +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) -<<<<<<< prepare_v1.0 Root([-1.41421, -1.41421]_com_NG, :unknown) - Not converged: region size smaller than the tolerance Root([1.41421, 1.41421]_com_NG, :unknown) - Not converged: region size smaller than the tolerance -======= - Root([-1.41421, -1.41421]_com, :unknown) - Root([1.41421, 1.41421]_com, :unknown) ->>>>>>> master Root([1.73205, 1.73205]_com_NG, :unique) ```