JuliaIntervals / IntervalRootFinding.jl

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

BigFloats don't give enclosure #95

Closed dpsanders closed 5 years ago

dpsanders commented 5 years ago
rts = roots(x->x^2 - 2, big(-∞..∞), 1e-70)

diam.(interval.(rts))

First diameter is 0, which is a bug, since it is not an enclosure of sqrt(2).

dpsanders commented 5 years ago

This seems to have been fixed, presumably by changes in IntervalArithmetic.jl:

julia> rts = roots(x->x^2 - 2, big(-∞..∞), 1e-70)
2-element Array{Root{Interval{BigFloat}},1}:
 Root([1.41421, 1.41422]₂₅₆, :unique)
 Root([-1.41422, -1.41421]₂₅₆, :unique)

julia> diam.(interval.(rts))
2-element Array{BigFloat,1}:
 1.727233711018888925077270372560079914223200072887256277004740694033718360632485e-77
 1.727233711018888925077270372560079914223200072887256277004740694033718360632485e-77