For example
julia> @btime besselj_zero_asymptotic(1, 501)
1.522 ns (0 allocations: 0 bytes)
1574.723079474818
julia> @btime besselj_zero(1, 501)
135.576 ns (0 allocations: 0 bytes)
1574.723079474818
julia> besselj_zero(1, 501) === besselj_zero_asymptotic(1, 501)
true
So, besselj_zero is 100x slower, but gives the same result bit for bit (for Float64) as the asymptotic one.
One could identify the cutoff. Or something more elaborate.
For example
So,
besselj_zerois 100x slower, but gives the same result bit for bit (forFloat64) as the asymptotic one.One could identify the cutoff. Or something more elaborate.