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

besselk with a BigFloat argument fails #116

Open
omalled opened this issue Sep 7, 2018 · 1 comment
Open

besselk with a BigFloat argument fails #116

omalled opened this issue Sep 7, 2018 · 1 comment

Comments

@omalled
Copy link

omalled commented Sep 7, 2018

I'm trying to update some code that currently uses my own implementation of the inverse Laplace transform to use InverseLaplace.jl instead. My code makes a call like SpecialFunctions.besselk(0, x). My implementation of the inverse Laplace transform results in x having type Float64, but InverseLaplace.jl wants x to be a BigFloat. This creates a problem

julia> SpecialFunctions.besselk(0, 1.0)
0.42102443824070834

julia> SpecialFunctions.besselk(0, BigFloat(1.0))
ERROR: MethodError: no method matching besselk(::BigFloat, ::Complex{BigFloat})
Closest candidates are:
  besselk(::T<:AbstractFloat, ::Complex{T<:AbstractFloat}) where T<:AbstractFloat at /homedir/.julia/v0.6/SpecialFunctions/src/bessel.jl:502
  besselk(::Real, ::Complex) at /homedir/.julia/v0.6/SpecialFunctions/src/bessel.jl:499
  besselk(::Any...; kwargs...) at deprecated.jl:1303
  ...
Stacktrace:
 [1] besselk(::Float64, ::Complex{BigFloat}) at /homedir/.julia/v0.6/SpecialFunctions/src/bessel.jl:500
 [2] besselk(::Int64, ::BigFloat) at /homedir/.julia/v0.6/SpecialFunctions/src/bessel.jl:450

It seems like that first candidate fits the bill, but julia disagrees.

@simonbyrne
Copy link
Member

There is currently no Bessel k function for BigFloats (the MPFR library we use only provides Bessel j and y functions, see https://www.mpfr.org/mpfr-current/mpfr.html#Special-Functions).

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

2 participants