Skip to content
New issue

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

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

Open
heltonmc opened this issue Aug 8, 2022 · 0 comments

Comments

@heltonmc
Copy link
Member

heltonmc commented Aug 8, 2022

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant