S15acc cl05
S15acc cl05
S15acc cl05
1. Purpose
nag cumul normal complem (s15acc) returns the value of the complement of the cumulative normal
distribution function Q(x).
2. Specification
#include <nag.h>
#include <nags.h>
double nag_cumul_normal_complem(double x)
3. Description
The function evaluates an approximate value for the complement of the cumulative normal
distribution function
∞
1
e−u /2 du.
2
Q(x) = √
2π x
4. Parameters
x
Input: the argument x of the function.
6. Further Comments
6.1. Accuracy
If and δ are the relative√errors in result and argument, respectively, then in principle they are
related by | | |(xe−x /2 2πQ(x)) δ|.
2
For x negative or small positive the multiplying factor is always less than one and accuracy is
mainly limited by machine precision. For large positive x we find ∼ x2 δ and hence to a certain
extent relative accuracy
√ is unavoidably lost. However the absolute error in the result, E, is given by
|E| |(xe−x /2 2π) δ|, and since this multiplying factor is always less than one absolute accuracy
2
7. See Also
nag deviates normal dist (g01cec)
nag cumul normal (s15abc)
8. Example
The following program reads values of the argument x from a file, evaluates the function at each
value of x and prints the results.
[NP3275/5/pdf] 3.s15acc.1
nag cumul normal complem NAG C Library Manual
3.s15acc.2 [NP3275/5/pdf]