tango.math.Bessel

Cylindrical Bessel functions of integral order.

License:

BSD style: see license.txt

Authors:

Stephen L. Moshier (original C code). Conversion to D by Don Clugston
real cylBessel_j0(real x)
Bessel function of order zero
Returns Bessel function of first kind, order zero of the argument.
real cylBessel_y0(real x)
Bessel function of the second kind, order zero Also known as the cylindrical Neumann function, order zero.
Returns Bessel function of the second kind, of order zero, of the argument.
real cylBessel_j1(real x)
Bessel function of order one
Returns Bessel function of order one of the argument.
real cylBessel_y1(real x)
Bessel function of the second kind, order zero
Returns Bessel function of the second kind, of order zero, of the argument.
real cylBessel_jn(int n, real x)
Bessel function of integer order
Returns Bessel function of order n, where n is a (possibly negative) integer.

The ratio of jn(x) to j0(x) is computed by backward recurrence. First the ratio jn/jn-1 is found by a continued fraction expansion. Then the recurrence relating successive orders is applied until j0 or j1 is reached.

If n = 0 or 1 the routine for j0 or j1 is called directly.

Bugs:

)
Not suitable for large n or x.
real cylBessel_yn(int n, real x)
Bessel function of second kind of integer order
Returns Bessel function of order n, where n is a (possibly negative) integer.

The function is evaluated by forward recurrence on n, starting with values computed by the routines cylBessel_y0() and cylBessel_y1().

If n = 0 or 1 the routine for cylBessel_y0 or cylBessel_y1 is called directly.
double cylBessel_i0(double x)
Modified Bessel function of order zero
Returns modified Bessel function of order zero of the argument.

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.
double cylBessel_i1(double x)
Modified Bessel function of order one
Returns modified Bessel function of order one of the argument.

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.