The function may be called by the names: s17dgc, nag_specfun_airy_ai_complex or nag_complex_airy_ai.
s17dgc returns a value for the Airy function or its derivative , where is complex, . Optionally, the value is scaled by the factor .
The function is derived from the function CAIRY in Amos (1986). It is based on the relations , and , where is the modified Bessel function and .
For very large , argument reduction will cause total loss of accuracy, and so no computation is performed. For slightly smaller , the computation is performed but results are accurate to less than half of machine precision. If is too large, and the unscaled function is required, there is a risk of overflow and so no computation is performed. In all the above cases, a warning is given by the function.
The NAG error argument (see Section 7 in the Introduction to the NAG Library CL Interface).
6Error Indicators and Warnings
Dynamic memory allocation failed.
See Section 3.1.2 in the Introduction to the NAG Library CL Interface for further information.
On entry, argument had an illegal value.
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.
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.
No computation because too large,
No computation – algorithm termination condition not met.
No computation because .
Results lack precision because .
All constants in s17dgc are given to approximately digits of precision. Calling 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 s17dgc, 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.
Empirical tests with modest values of , checking relations between Airy functions , , and , have shown errors limited to the least significant – digits of precision.
8Parallelism and Performance
Background information to multithreading can be found in the Multithreading documentation.
s17dgc is not threaded in any implementation.
Note that if the function is required to operate on a real argument only, then it may be much cheaper to call s17agcors17ajc.
This example prints a caption and then proceeds to read sets of data from the input data stream. The first datum is a value for the argument deriv, the second is a complex value for the argument, z, and the third is a character value
used as a flag
to set the argument scal. The program calls the function and prints the results. The process is repeated until the end of the input data stream is encountered.