Skip to content

Don't run optimization if expansion is already good to eps #26

@jlapeyre

Description

@jlapeyre

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions