home *** CD-ROM | disk | FTP | other *** search
- nmdt(x,p)
-
- /* accumulative normal distribution function. */
-
- float x,*p;
-
- {
- static float a[3]={.4361836,-.120676,.9372980};
- float r = .33267, e = .367879, f = .3989423;
- float t;
- extern double fabs(),pow();
-
- t = 1.0 / (1.0 + r * fabs(x));
- *p = (f * pow(e,(x*x*0.5))) * t *(a[0] + t * (a[1] + t * a[2]));
- if (x >= 0.0) *p = 1. - *p;
- }