
function NormDens (x : real) : real;
       const   c = 0.3989422804;
       begin
               NormDens := c * exp(-sqr(x) / 2)
       end;


function NormProb (x : Real) : Real;
       const   b0 = +0.319381530; b1 = -0.356563782;
               b2 = +1.781477937; b3 = -1.821255978; 
               b4 = +1.330274429; p = +0.2316419;
       var     Temp, t : Real;
                       Positive : Boolean;

       begin
               Positive := x > 0;
               x := Abs(x);
               t := 1 / (1 + p * X);
               Temp := NormDens(x)*t*(b0+t*(b1+t*
                       (b2+t*(b3+b4*t))));
               if Positive then Temp := 1 - Temp;
               NormProb := Temp
       end;
