Class ModifiedBessel
Adapted from the CERN "cern.jet.math.tdouble" package as included with the ParallelColt library.
-
Method Summary
-
Method Details
-
i0
public static double i0(double x) Modified zero-order Bessel function.The function is defined as i0(x) = J0( ix ). The range is partitioned into the two intervals [0,8] and (8, infinity). Chebyshev polynomial expansions are employed in each interval.
- Parameters:
x
- input parameter- Returns:
- i0(x)
-
i1
public static double i1(double x) Modified 1st-order Bessel function.The function is defined as i1(x) = -i j1( ix ). The range is partitioned into the two intervals [0,8] and (8, infinity). Chebyshev polynomial expansions are employed in each interval.
- Parameters:
x
- input parameter.- Returns:
- i1(x).
-
i1OverI0
public static double i1OverI0(double x) Compute the ratio of i1(x) to i0(x).This implementation avoids redundant calculations by computing both i1(x) and i0(x) efficiently for different ranges of x.
- Parameters:
x
- input parameter- Returns:
- i1(x) / i0(x)
-
lnI0
public static double lnI0(double x) Compute the natural log(i0(x)).This implementation computes log(i0(x)) directly to avoid overflow for large x values. For large x, i0(x) ~ exp(x)/sqrt(2*pi*x), so log(i0(x)) ~ x - 0.5*log(2*pi*x).
- Parameters:
x
- input parameter.- Returns:
- the natural log(i0(x)).
-