For , where is an implementation-dependent number,
where and , .
For , to within machine precision.
Abramowitz M and Stegun I A (1972) Handbook of Mathematical Functions (3rd Edition) Dover Publications
1: – Real (Kind=nag_wp)Input
On entry: the argument of the function.
2: – IntegerInput/Output
On entry: ifail must be set to , . If you are unfamiliar with this argument you should refer to Section 3.4 in How to Use the NAG Library and its Documentation 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 argument, the recommended value is . When the value is used it is essential to test the value of ifail on exit.
On exit: unless the routine detects an error or a warning has been flagged (see Section 6).
Error Indicators and Warnings
There are no failure exits from s13adf. The argument ifail has been included for consistency with other routines in this chapter.
If and are the relative errors in the argument and result, respectively, then in principle
The equality may hold if is greater than the machine precision ( due to data errors etc.) but if is simply due to round-off in the machine representation, then since the factor relating to is always less than one, the accuracy will be limited by machine precision.
Parallelism and Performance
s13adf is not threaded in any implementation.
This example reads values of the argument from a file, evaluates the function at each value of and prints the results.