subroutine nrmd m (r1) c c + + + PURPOSE + + + c Returns the standard normal deviate for a given probability value c (e.g. r1=.99 returns r1=2.328) c c + + + ARGUMENT DECLARATIONS + + + real r1 c c + + + ARGUMENT DEFINITIONS + + + c r1 - initially, the probability; finally the std. norm. deviate. c c + + + LOCAL VARIABLES + + + real sgn, hp,t c + + + LOCAL DEFINITIONS + + + c + + + END SPECIFICATIONS + + + c if(r1 .ge. 0.5) then sgn = 1.0 hp = 1.0 - r1 else sgn = -1.0 hp = r1 endif t = sqrt(alog(1./(hp*hp))) r1 = sgn*(t-(2.30753+.27061*t)/(1.+.99229*t+.04481*t*t)) return end