|
NAG[s17dcc] NAG[nag_complex_bessel_y] - Bessel functions , real , complex ,
|
|
Calling Sequence
s17dcc(fnu, z, scal, cy, nz, 'n'=n, 'fail'=fail)
nag_complex_bessel_y(. . .)
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.
|
|
On exit: the number of components of cy that are set to zero due to underflow. The positions of such components in the array cy are arbitrary.
|
|
|
'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_y (s17dcc) evaluates a sequence of values for the 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 .
Note: although the function may not be called with less than zero, for negative orders the formula may be used (for the Bessel function , see s17dec (nag_complex_bessel_j)).
The function is derived from the function CBESY in Amos (1986). It is based on the relation , where and are the Hankel functions of the first and second kinds respectively (see s17dlc (nag_complex_hankel)).
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_ALLOC_FAIL"
Dynamic memory allocation failed.
"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 .
|
|
Further Comments
|
|
The time taken by nag_complex_bessel_y (s17dcc) for a call of nag_complex_bessel_y (s17dcc) is approximately proportional to the value of , plus a constant. In general it is much cheaper to call nag_complex_bessel_y (s17dcc) with greater than 1, rather than to make separate calls to nag_complex_bessel_y (s17dcc).
Paradoxically, for some values of and , it is cheaper to call nag_complex_bessel_y (s17dcc) with a larger value of 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 , 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 unscaled function value is required, then it may be much cheaper to call s17acc (nag_bessel_y0) or s17adc (nag_bessel_y1) respectively.
|
|
|
Examples
|
|
>
|
fnu := 0:
z := 0.3 +0.4*I:
n := 2:
scal := "Nag_UnscaleRes":
cy := Vector(2, datatype=complex[8]):
NAG:-s17dcc(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.
|
|