At some point in my code I need to calculate the modified Bessel of the first kind of order n=1000, but I'm getting whether Inf or 0.0 values when calling the jdistlib.math.Bessel library in java. knowing that my input values are in the range of (0.001 - 1024) can anyone give me any good advice on how to solve this problem ?
Asked
Active
Viewed 59 times
0
-
Depends on the Bessel function. J(x, n), I(x, n), K(x, n), and Y(x, n) are very different functions. The modified function Y(x, n) is indeed singular at x = 0. – duffymo Feb 11 '20 at 18:56
-
You say "modified Bessel [function] of the first kind," can you confirm that it is [Bessel.i](http://jdistlib.sourceforge.net/javadoc/jdistlib/math/Bessel.html#i-double-double-boolean-) that you are calling, and what value are you passing in for `expo` i.e. are you using exponential scaling? – David Conrad Feb 11 '20 at 18:59
-
Note: I'm not really any kind of expert on this, but I believe I found the Javadocs for the library you're using, and that information might help someone to help you. Also, which version of the library are you using? – David Conrad Feb 11 '20 at 19:00
-
n = 1000? You should look at the series and ask yourself what will happen when n gets large for the function you have in mind. – duffymo Feb 11 '20 at 19:03
-
1@DavidConrad yes I'm using the Bessel.i and yeah I'm setting the exponential scaling to true. the range of values is (0.001 - 1024) I know that even by using the exponential scaling won't help because when the input number is high the exp function goes to Inf as well. For the jdistlib library I'm using 0.4.4 version – h_enn Feb 11 '20 at 19:10
-
You might be better off writing your own for large values of n: https://en.wikipedia.org/wiki/Bessel_function – duffymo Feb 11 '20 at 19:45