nag_erfc (s15adc) calculates an approximate value for the complement of the error function
The approximation is based on a Chebyshev expansion.
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.
6 Error Indicators and Warnings
None.
7 Accuracy
If and are relative errors in the argument and result, respectively, then in principle , so that the relative error in the argument, , is amplified by a factor in the result.
Near this factor behaves as and hence the accuracy is largely determined by the machine precision. Also for large negative , where the factor is , accuracy is mainly limited by machine precision. However, for large positive , the factor becomes and to an extent relative accuracy is necessarily lost. The absolute accuracy is given by so absolute accuracy is guaranteed for all .
8 Further Comments
None.
9 Example
The following program reads values of the argument from a file, evaluates the function at each value of and prints the results.