We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tol
Float64
The following throws a MethodError:
MethodError
julia> using IntervalArithmetic, IntervalRootFinding julia> f(x) = -4*x^3 + 5*x^4 f (generic function with 1 method) julia> dom = big(0) .. big(1) [0, 1]₂₅₆ julia> roots(f, dom, Newton, 1.0e-5) # works ok 2-element Array{Root{Interval{BigFloat}},1}: Root([0.799999, 0.800001]₂₅₆, :unique) Root([0, 6.67704e-06]₂₅₆, :unknown) julia> roots(f, dom, Newton, parse(BigFloat, "1.0e-5")) ERROR: MethodError: no method matching roots(::typeof(f), ::Interval{BigFloat}, ::Type{Newton}, ::BigFloat) Closest candidates are: roots(::Any, ::Interval{T}, ::Union{Type{Krawczyk}, Type{Newton}}) where T at /Users/benet/.julia/dev/IntervalRootFinding/src/roots.jl:153 roots(::Any, ::Interval{T}, ::Union{Type{Krawczyk}, Type{Newton}}, ::Float64) where T at /Users/benet/.julia/dev/IntervalRootFinding/src/roots.jl:153 roots(::F<:Function, ::F<:Function, ::Any) where F<:Function at /Users/benet/.julia/dev/IntervalRootFinding/src/roots.jl:226 ... Stacktrace: [1] top-level scope at none:0
I think it makes sense to allow tol in the roots methods to be <:AbstractFloat?
roots
<:AbstractFloat
The text was updated successfully, but these errors were encountered:
Sure. I think it can be any real number in fact.
Sorry, something went wrong.
Currently we are requiring all arguments to have the same type, but this type can be anything.
This still fails, because some default arguments are Float64, so if not everything is specified, it fails.
No branches or pull requests
The following throws a
MethodError
:I think it makes sense to allow
tol
in theroots
methods to be<:AbstractFloat
?The text was updated successfully, but these errors were encountered: