NAG Library Function Document
nag_bessel_k_alpha_scaled (s18ehc)
1 Purpose
nag_bessel_k_alpha_scaled (s18ehc) returns a sequence of values for the scaled modified Bessel functions for real , selected values of and .
2 Specification
#include <nag.h> |
#include <nags.h> |
void |
nag_bessel_k_alpha_scaled (double x,
Integer ia,
Integer ja,
Integer nl,
double b[],
NagError *fail) |
|
3 Description
nag_bessel_k_alpha_scaled (s18ehc) evaluates a sequence of values for the scaled modified Bessel function of the second kind , where is real and non-negative and is the order. The -member sequence is generated for orders .
4 References
Abramowitz M and Stegun I A (1972) Handbook of Mathematical Functions (3rd Edition) Dover Publications
5 Arguments
- 1:
x – doubleInput
-
On entry: the argument of the function.
Constraint:
.
- 2:
ia – IntegerInput
- 3:
ja – IntegerInput
-
On entry: the numerator
and denominator
, respectively, of the order
of the first member in the required sequence of function values. Only the following combinations of pairs of values of
and
are allowed:
- and corresponds to ;
- and corresponds to ;
- and corresponds to ;
- and corresponds to ;
- and corresponds to ;
- and corresponds to .
Constraint:
ia and
ja must constitute a valid pair
,
,
,
,
or
.
- 4:
nl – IntegerInput
-
On entry: the value of . Note that the order of the last member in the required sequence of function values is given by .
Constraint:
.
- 5:
b[] – doubleOutput
-
On exit: with
or
, the required sequence of function values:
b contains
, for
.
- 6:
fail – NagError *Input/Output
-
The NAG error argument (see
Section 3.6 in the Essential Introduction).
6 Error Indicators and Warnings
- NE_INT
-
On entry, .
Constraint: .
- NE_INT_2
-
On entry,
,
.
Constraint:
ia and
ja must constitute a valid pair (
ia,
ja).
- 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 contact
NAG for assistance.
- NE_OVERFLOW_LIKELY
-
The evaluation has been abandoned due to the likelihood of overflow.
- NE_REAL
-
On entry, .
Constraint: .
- NE_TERMINATION_FAILURE
-
The evaluation has been abandoned due to failure to satisfy the termination condition.
- NE_TOTAL_PRECISION_LOSS
-
The evaluation has been abandoned due to total loss of precision.
- NW_SOME_PRECISION_LOSS
-
The evaluation has been completed but some precision has been lost.
7 Accuracy
All constants in the underlying function are specified to approximately 18 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 the underlying function, 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 value of , the less the precision in the result.
8 Parallelism and Performance
Not applicable.
None.
10 Example
The example program evaluates and at , and prints the results.
10.1 Program Text
Program Text (s18ehce.c)
10.2 Program Data
Program Data (s18ehce.d)
10.3 Program Results
Program Results (s18ehce.r)