PDF version (NAG web site
, 64-bit version, 64-bit version)
NAG Toolbox: nag_specfun_bessel_j_seq_complex (s18gk)
Purpose
nag_specfun_bessel_j_seq_complex (s18gk) returns a sequence of values for the Bessel functions or for complex , non-negative and .
Syntax
[
b,
ifail] = nag_specfun_bessel_j_seq_complex(
z,
a,
nl)
Description
nag_specfun_bessel_j_seq_complex (s18gk) evaluates a sequence of values for the Bessel function of the first kind
, where
is complex and nonzero and
is the order with
. The
-member sequence is generated for orders
when
. Note that
is replaced by
when
. For positive orders the function may also be called with
, since
when
. For negative orders the formula
is used to generate the required sequence. The appropriate values of
and
are obtained by calls to
nag_specfun_bessel_y_complex (s17dc) and
nag_specfun_bessel_j_complex (s17de).
References
Abramowitz M and Stegun I A (1972) Handbook of Mathematical Functions (3rd Edition) Dover Publications
Parameters
Compulsory Input Parameters
- 1:
– complex scalar
-
The argument of the function.
Constraint:
when .
- 2:
– double scalar
-
The order of the first member in the required sequence of function values.
Constraint:
.
- 3:
– int64int32nag_int scalar
-
The value of .
Constraint:
.
Optional Input Parameters
None.
Output Parameters
- 1:
– complex array
-
With or , the required sequence of function values:
contains if and otherwise, for .
- 2:
– int64int32nag_int scalar
unless the function detects an error (see
Error Indicators and Warnings).
Error Indicators and Warnings
Errors or warnings detected by the function:
Cases prefixed with W are classified as warnings and
do not generate an error of type NAG:error_n. See nag_issue_warnings.
-
-
On entry, | when , |
or | , |
or | , |
or | . |
-
-
The computation has been abandoned due to the likelihood of overflow.
- W
-
The computation has been completed but some precision has been lost.
-
-
The computation has been abandoned due to total loss of precision.
-
-
The computation has been abandoned due to failure to satisfy the termination condition.
-
An unexpected error has been triggered by this routine. Please
contact
NAG.
-
Your licence key may have expired or may not have been installed correctly.
-
Dynamic memory allocation failed.
Accuracy
All constants in
nag_specfun_bessel_y_complex (s17dc) and
nag_specfun_bessel_j_complex (s17de)
are specified to approximately
digits of precision. If
denotes the number of digits of precision in the floating-point arithmetic being used, then clearly the maximum number of correct digits in the results obtained is limited by
. Because of errors in argument reduction when computing elementary functions inside
nag_specfun_bessel_y_complex (s17dc) and
nag_specfun_bessel_j_complex (s17de), the actual number of correct digits is limited, in general, by
,
where
represents the number of digits lost due to the argument reduction. Thus the larger the values of
and
, the less the precision in the result.
Further Comments
None.
Example
This example evaluates and at , and prints the results.
Open in the MATLAB editor:
s18gk_example
function s18gk_example
fprintf('s18gk example results\n\n');
z = 0.6 - 0.8i;
a = 0;
nl = int64(3);
[b, ifail] = s18gk(z, a, nl);
fprintf(' alpha J_alpha(%5.1f%+5.1fi)\n',real(z), imag(z));
for j=1:nl+1
fprintf('%10.2e %12.4e%+12.4ei\n', a+double(j-1), real(b(j)), imag(b(j)));
end
s18gk example results
alpha J_alpha( 0.6 -0.8i)
0.00e+00 1.0565e+00 +2.4811e-01i
1.00e+00 3.5825e-01 -3.7539e-01i
2.00e+00 -2.5974e-02 -1.2538e-01i
3.00e+00 -1.9369e-02 -8.6380e-03i
PDF version (NAG web site
, 64-bit version, 64-bit version)
© The Numerical Algorithms Group Ltd, Oxford, UK. 2009–2015