bes(3f) - [M_bessel::INTRO] calculate Bessel functions J(X), Y(X), I(X), K(X) for doubleprecision arguments and integer orders
Synopsis
Description
Options
Authors
Example
subroutine bes(x,no,kode,rslt1,rslt2,t1,t2,ierr)
This routine calculates the Bessel functions J(X),Y(X), I(X), or K(X) for doubleprecision arguments and integer orders. Backwards recurrence techniques are used for the J(X) and I(X) functions except for very small arguments, where double precision series evaluation is used. Forward recurrence is used for the Y(X) and K(X) functions with double precision Chebyshev approximations used for function initialization. Accuracy is between thirteen and fourteen significant figures. For specific functions J0(), J1(), Y0(), Y1(), See BESJ0(), BESJ1(), BESY0(), and BESY1().
Description of parameters
X = input,doubleprecision argument of the Bessel function. The argument may be positive,zero, or negative (neg. arg. for Y(X) or K(X) produces error message since results may be complex.) Restriction on range isFOR J(X), -1100.0 .LE. X .LE. 1100.0 FOR Y(X), 0.0 .LE. X .LE. 1100.0 FOR I(X), -600.0 .LE. X .LE. 600.0 FOR K(X), 0.0 .LE. X .LE. 600.0
NO = Input,integer order of function desired for a single value to be returned, or the maximum order desired (+ or -) if an array of values is to be returned. Let XX = abs(X). Then bounds on orders are
1. For 0.0 .LE. XX .LE. 0.025, The absolute value of maximum order, ANO, and argument supplied (ABS(X)) must satisfy the relation
log(GAMMA(ANO))-ANO*log(XX/2.0) + log(XX)/2.0 .LE. 679.0
For a given argument and an order greater than that allowed by the above relation
JN(X) = 0.0, N.NE.0, AND =1.0 FOR N=0 YN(X) = -INF IN(X) = 0.0, N.NE.0, AND =1.0 FOR N=0 KN(X) = INF 2. FOR 0.025 .LT. XX .LE. 0.20, ABS(NO) .LE. INT(140.0*XX + 83.0) 3. FOR 0.20 .LT. XX .LE. 1.0, ABS(NO) .LE. INT(42.0*XX + 102.0) 4. FOR 1.0 .LT. XX .LE. 20.0, ABS(NO) .LE. INT(0.02*XX**3 - 0.86*XX**2 + 17.15*XX + 124.0) 5. FOR 20.0 .LT. XX .LE. 100.0, ABS(NO) .LE. INT(2.75*XX + 228.0) 6. FOR 100.0 .LT. XX .LE. 400.0, ABS(NO) .LE. INT(1.67*XX + 336.0) 7. FOR 400.0 .LT. XX .LE. 1100.0, ABS(NO) .LE. INT(1.33*XX + 470.0)
KODE = Input,integer indicator for the particular function to be computed.
KODE = 10 -- FUNCTION J(X) ONLY = 11 -- Y(X) ONLY = 12 -- J(X) AND Y(X)
= 20 -- I(X) ONLY = 21 -- K(X) ONLY = 22 -- I(X) AND K(X)
RSLT1 = output,contains the doubleprecision function value for J(X) or I(X) corresponding to the order and argument supplied, depending on the KODE value. This parameter would contain the result if only one function value is to be returned.
RSLT2 = output,contains the doubleprecision function value for Y(X) or K(X) in a manner similar to RSLT1.
T1 = output,a work area which will contain the array of doubleprecision function values for J(X) or I(X) of orders zero through NO, depending on KODE. T1 must be dimensioned in the calling program and must contain at least M cells of storage, where
M = MAX(ABS(NO),INT(2*ABS(X))) + 51
In using the array, T1(1) = function of order 0, --- T1(NO+1) = function of order NO.
T2 = Output,similar to T1 for the functions Y(X) or K(X). an exception is that if only J(X) or I(X) are called, then T2 needs no dimension in the calling program, but the parameter must still appear in the calling sequence. Otherwise, T2 must be dimensioned at least M.
IERR = Output,error flag for the conditions
-- Normal code =0, Normal - No errors -- Abnormal codes =1, Argument out of range =2, Order too large for argument supplied =3, Argument too large for I(X) and K(X) =4, Negative arguments for Y(X) or K(X) =5, Incorrect parameter KODE
BS is documented for the original version in SC-M-69-336
Based on routines originally from
Sandia Mathematical Program Library Applied Mathematics Division 2642 Sandia Laboratories P. O. Box 5800 Albuquerque, New Mexico 87115 Control Data 6600 Version 5.1, 10 December 1973Written by Ronald D. Halbgewachs, July, 1968. Modified by RDH for increased accuracy, May 8,1973.
Nemo Release 3.1 | bes (3) | February 23, 2025 |