NAG Library Routine Document
S18GKF returns a sequence of values for the Bessel functions or for complex , non-negative and .
S18GKF evaluates a sequence of values for the Bessel function of the first kind
is complex and nonzero and
is the order with
-member sequence is generated for orders
. Note that
is replaced by
. For positive orders the routine may also be called with
. For negative orders the formula
is used to generate the required sequence. The appropriate values of
are obtained by calls to S17DCF
Abramowitz M and Stegun I A (1972) Handbook of Mathematical Functions (3rd Edition) Dover Publications
- 1: Z – COMPLEX (KIND=nag_wp)Input
On entry: the argument of the function.
- 2: A – REAL (KIND=nag_wp)Input
On entry: the order of the first member in the required sequence of function values.
- 3: NL – INTEGERInput
On entry: the value of .
- 4: B() – COMPLEX (KIND=nag_wp) arrayOutput
On exit: with or , the required sequence of function values:
contains if and otherwise, for .
- 5: IFAIL – INTEGERInput/Output
must be set to
. If you are unfamiliar with this parameter you should refer to Section 3.3
in the Essential Introduction for details.
For environments where it might be inappropriate to halt program execution when an error is detected, the value
is recommended. If the output of error messages is undesirable, then the value
is recommended. Otherwise, if you are not familiar with this parameter, the recommended value is
. When the value is used it is essential to test the value of IFAIL on exit.
unless the routine detects an error or a warning has been flagged (see Section 6
6 Error Indicators and Warnings
If on entry
, explanatory error messages are output on the current error message unit (as defined by X04AAF
Errors or warnings detected by the routine:
|On entry,|| when ,|
The computation has been abandoned due to the likelihood of overflow.
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.
All constants in S17DCF
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 S17DCF
, the actual number of correct digits is limited, in general, by
represents the number of digits lost due to the argument reduction. Thus the larger the values of
, the less the precision in the result.
This example evaluates and at , and prints the results.
9.1 Program Text
Program Text (s18gkfe.f90)
9.2 Program Data
Program Data (s18gkfe.d)
9.3 Program Results
Program Results (s18gkfe.r)