Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
6 changes: 3 additions & 3 deletions docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
```

Expand Down Expand Up @@ -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)
```

Expand Down
2 changes: 1 addition & 1 deletion docs/src/internals.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions docs/src/roots.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions src/roots.jl
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ end

function RootProblem(
f, root::Root ;
contractor = Newton,
contractor = Krawczyk,
derivative = nothing,
search_order = BreadthFirst,
abstol = 1e-7,
Expand Down Expand Up @@ -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)]

Expand Down
Loading