预订演示
前页 后页

ndtr

Normal distribution function.

SYNOPSIS:

double x, y, ndtr();
y = ndtr(x);

DESCRIPTION:

Returns the area under the Gaussian probability density function, integrated from minus infinity to x:

                              x
                             -
                   1        | |         2
    ndtr(x)  = ---------    |    exp(- t /2) dt
               sqrt(2pi)  | |
                           -
                          -inf.

             =  (1 + erf(z)) / 2
             =  erfc(z) / 2

where z = x/sqrt(2).

Computation is via the functions erf and erfc, with care to avoid error amplification in computing exp(-x^2).

ACCURACY:

                      Relative error:
arithmetic   domain     # trials      peak         rms
    IEEE     -13,0        30000       1.3e-15     2.2e-16


ERROR MESSAGES:

   message         condition         value returned
   underflow      x > 37.519379347        0.0