NAG Library Function Document
nag_erfc (s15adc) returns the value of the complementary error function, .
||nag_erfc (double x)
nag_erfc (s15adc) calculates an approximate value for the complement of the error function
The approximation is based on a Chebyshev expansion.
Abramowitz M and Stegun I A (1972) Handbook of Mathematical Functions (3rd Edition) Dover Publications
x – doubleInput
On entry: the argument of the function.
6 Error Indicators and Warnings
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 .
The following program reads values of the argument from a file, evaluates the function at each value of and prints the results.
9.1 Program Text
Program Text (s15adce.c)
9.2 Program Data
Program Data (s15adce.d)
9.3 Program Results
Program Results (s15adce.r)