The function may be called by the names: s18crc, nag_specfun_bessel_k1_scaled_vector or nag_bessel_k1_scaled_vector.
3Description
s18crc evaluates an approximation to , where is a modified Bessel function of the second kind for an array of arguments , for . The scaling factor removes most of the variation in .
The function uses the same Chebyshev expansions as s18arc, which returns an array of the unscaled values of .
is too close to zero, as determined by the value of the safe-range parameter X02AMC: there is a danger of causing overflow. contains the reciprocal of the safe-range parameter.
5: – NagError *Input/Output
The NAG error argument (see Section 7 in the Introduction to the NAG Library CL Interface).
6Error Indicators and Warnings
NE_ALLOC_FAIL
Dynamic memory allocation failed.
See Section 3.1.2 in the Introduction to the NAG Library CL Interface for further information.
NE_BAD_PARAM
On entry, argument had an illegal value.
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 contact NAG for assistance.
See Section 7.5 in the Introduction to the NAG Library CL Interface for further information.
NE_NO_LICENCE
Your licence key may have expired or may not have been installed correctly.
See Section 8 in the Introduction to the NAG Library CL Interface for further information.
NW_IVALID
On entry, at least one value of x was invalid.
Check ivalid for more information.
7Accuracy
Relative errors in the argument are attenuated when propagated into the function value. When the accuracy of the argument is essentially limited by the machine precision, the accuracy of the function value will be similarly limited by at most a small multiple of the machine precision.
8Parallelism and Performance
Background information to multithreading can be found in the Multithreading documentation.
s18crc is not threaded in any implementation.
9Further Comments
None.
10Example
This example reads values of x from a file, evaluates the function at each value of and prints the results.