JuliaMath / JuliaMath/FunctionZeros.jl

When nu is large enough, the root finding fails.

Open
#29 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Julia
Stars
9
Forks
5
PR merge metrics
No merged PRs in 30d

Description

When `nu` is large enough, the root finding fails.

```
(@v1.12) pkg> st FunctionZeros
Status `~/.julia/environments/v1.12/Project.toml`
[b21f74c0] FunctionZeros v1.1.0

julia> besselj_
besselj_deriv_zero
besselj_zero
julia> besselj_zero(73.5, 2)
ERROR: DomainError with -57.89075833371584:
`x` must be nonnegative.
Stacktrace:
[1] besselj(nu::Float64, x::Float64)
@ SpecialFunctions ~/.julia/packages/SpecialFunctions/6nmlv/src/bessel.jl:527
[2] #_besselj_zero##0
@ ~/.julia/packages/FunctionZeros/aNQPA/src/FunctionZeros.jl:93 [inlined]
[3] Callable_Function
@ ~/.julia/packages/Roots/odaES/src/functions.jl:29 [inlined]
[4] update_state
@ ~/.julia/packages/Roots/odaES/src/DerivativeFree/secant.jl:39 [inlined]
[5] update_state
@ ~/.julia/packages/Roots/odaES/src/DerivativeFree/secant.jl:29 [inlined]
[6] solve!(𝐙::Roots.ZeroProblemIterator{Roots.Secant, Roots.AlefeldPotraShi, Roots.Callable_Function{…}, Roots.UnivariateZeroState{…}, Roots.UnivariateZeroOptions{…}, Roots.NullTracks}; verbose::Bool)
@ Roots ~/.julia/packages/Roots/odaES/src/hybrid.jl:54
[7] solve!
@ ~/.julia/packages/Roots/odaES/src/hybrid.jl:30 [inlined]
[8] solve(𝑭𝑿::Roots.ZeroProblem{FunctionZeros.var"#_besselj_zero##0#_besselj_zero##1"{Float64}, Float64}, M::Roots.Order0, p::Nothing; verbose::Bool, kwargs::@Kwargs{tracks::Roots.NullTracks})
@ Roots ~/.julia/packages/Roots/odaES/src/find_zero.jl:498
[9] solve
@ ~/.julia/packages/Roots/odaES/src/find_zero.jl:490 [inlined]
[10] #find_zero#40
@ ~/.julia/packages/Roots/odaES/src/find_zero.jl:220 [inlined]
[11] find_zero (repeats 2 times)
@ ~/.julia/packages/Roots/odaES/src/find_zero.jl:210 [inlined]
[12] find_zero
@ ~/.julia/packages/Roots/odaES/src/find_zero.jl:243 [inlined]
[13] _besselj_zero
@ ~/.julia/packages/FunctionZeros/aNQPA/src/FunctionZeros.jl:92 [inlined]
[14] besselj_zero(nu::Float64, n::Int64)
@ FunctionZeros ~/.julia/packages/FunctionZeros/aNQPA/src/FunctionZeros.jl:117
[15] top-level scope
@ REPL[6]:1
Some type information was truncated. Use `show(err)` to see complete types.
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.