JuliaMath / SpecialFunctions.jl

Special mathematical functions in Julia
https://specialfunctions.juliamath.org/stable/
Other
359 stars 100 forks source link

Bessel functions only support BigFloat arguments for integer orders #241

Open Ceboc opened 4 years ago

Ceboc commented 4 years ago

Hi! I'm using the besselj and bessely ( )functions on a function to solve their zeros, as is shown in the source code of boostlibrary (https://github.com/Ceboc/BesselZeros). As i want to resolve roots with large values in certain x's interval, x_min < x_roots < x_max, where with .

The problem that i found is that is not consistent how bessely works. imagen imagen imagen imagen imagen

That it's, if i use a i must give an bigfloat argument, but if i want to use a non entire value for , doesn't works.

I was using a wrap of the equivalent boost functions on CxxWrap, but i have problems with the parallelization, so i wrote my own functions to find the zeros of bessels.

PaulXiCao commented 3 years ago

The problem that i found is that is not consistent how bessely works.

There is only a BigFloat implementation of bessely(nu, x) for integer values of nu. This explains why you get the MethodErrors. Thus, it is not inconsistent but rather just not implemented.