|
NAG[s18dcc] NAG[nag_complex_bessel_k] - Modified Bessel functions , real , complex ,
|
|
Calling Sequence
s18dcc(fnu, z, scal, cy, nz, 'n'=n, 'fail'=fail)
nag_complex_bessel_k(. . .)
Parameters
|
fnu - float;
|
|
|
On entry: , the order of the first member of the sequence of functions.
|
|
Constraint: . .
|
|
|
z - complex;
|
|
|
On entry: the argument of the functions.
|
|
Constraint: . .
|
|
|
scal - String;
|
|
|
On entry: the scaling option.
|
|
The results are returned unscaled.
|
|
The results are returned scaled by the factor .
|
|
Constraint: "Nag_UnscaleRes" or "Nag_ScaleRes". .
|
|
|
cy - Vector(1..n, datatype=complex[8]);
|
|
|
|
nz - assignable;
|
|
|
Note: On exit the variable nz will have a value of type integer.
|
|
|
'n'=n - integer; (optional)
|
|
|
On entry: , the number of members required in the sequence .
|
|
Constraint: . .
|
|
|
'fail'=fail - table; (optional)
|
|
|
The NAG error argument, see the documentation for NagError.
|
|
|
|
Description
|
|
|
Description
|
|
nag_complex_bessel_k (s18dcc) evaluates a sequence of values for the modified Bessel function , where is complex, , and is the real, non-negative order. The -member sequence is generated for orders , . Optionally, the sequence is scaled by the factor .
The function is derived from the function CBESK in Amos (1986).
Note: although the function may not be called with less than zero, for negative orders the formula may be used.
When is greater than 1, extra values of are computed using recurrence relations.
For very large or , argument reduction will cause total loss of accuracy, and so no computation is performed. For slightly smaller or , the computation is performed but results are accurate to less than half of machine precision. If is very small, near the machine underflow threshold, or is too large, there is a risk of overflow and so no computation is performed. In all the above cases, a warning is given by the function.
|
|
Error Indicators and Warnings
|
|
"NE_BAD_PARAM"
On entry, argument had an illegal value.
"NE_COMPLEX_ZERO"
On entry, .
"NE_INT"
On entry, . Constraint: .
"NE_INTERNAL_ERROR"
An internal error has occurred in this function. Check the function call and any array sizes. If the call is correct then please consult NAG for assistance.
"NE_OVERFLOW_LIKELY"
No computation because .
No computation because is too large.
"NE_REAL"
On entry, . Constraint: .
"NE_TERMINATION_FAILURE"
No computation – algorithm termination condition not met.
"NE_TOTAL_PRECISION_LOSS"
No computation because .
No computation because .
"NW_SOME_PRECISION_LOSS"
Results lack precision because .
Results lack precision because .
|
|
Further Comments
|
|
The time taken by nag_complex_bessel_k (s18dcc) for a call of nag_complex_bessel_k (s18dcc) is approximately proportional to the value of n, plus a constant. In general it is much cheaper to call nag_complex_bessel_k (s18dcc) with n greater than 1, rather than to make separate calls to nag_complex_bessel_k (s18dcc).
Paradoxically, for some values of and , it is cheaper to call nag_complex_bessel_k (s18dcc) with a larger value of n than is required, and then discard the extra function values returned. However, it is not possible to state the precise circumstances in which this is likely to occur. It is due to the fact that the base value used to start recurrence may be calculated in different regions for different n, and the costs in each region may differ greatly.
Note that if the function required is or , i.e., or , where is real and positive, and only a single function value is required, then it may be much cheaper to call s18acc (nag_bessel_k0), s18adc (nag_bessel_k1), s18ccc (nag_bessel_k0_scaled) or s18cdc (nag_bessel_k1_scaled), depending on whether a scaled result is required or not.
|
|
|
Examples
|
|
>
|
fnu := 0:
z := 0.3 +0.4*I:
n := 2:
scal := "Nag_UnscaleRes":
cy := Vector(2, datatype=complex[8]):
NAG:-s18dcc(fnu, z, scal, cy, nz, 'n' = n):
|
|
|
See Also
|
|
Abramowitz M and Stegun I A (1972) Handbook of Mathematical Functions (3rd Edition) Dover Publications
Amos D E (1986) Algorithm 644: A portable package for Bessel functions of a complex argument and non-negative order ACM Trans. Math. Software 12 265–273
s Chapter Introduction.
NAG Toolbox Overview.
NAG Web Site.
|
|