Skip to content

Improve accuracy of asymptotic expansion for very large arguments (besselj, bessely) #37

Open
@heltonmc

Description

@heltonmc

Right now, for very large arguments there are some roundoff errors when the argument is very large.

julia> Bessels.besseljy_large_argument(11, 2e9)
(-6.441564914025336e-6, 1.663779215046842e-5)

julia> Bessels.besseljy_large_argument(big"11", big"2e9")
(-6.441565416278640966871190587378818114705713999893782928810537933625658595387592e-06, 1.663779195601368418718142484679994485342917679346562260323801403887512758594912e-05)

It would be nice to improve the accuracy of these expansions.

Edit: Though it does look like it then improves...

julia> SpecialFunctions.besselj(11.0, 2e9)
-6.441565416278642e-6

julia> besselj(11.0, 2e9)
-6.441564914025336e-6

julia> besselj(11.0, 2e20)
4.600631613945902e-11

julia> SpecialFunctions.besselj(11.0, 2e20)
4.600631613945894e-11

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