NORRAN SUBROUTINE NORRAN(N,ISTART,X) PURPOSE--This subroutine generates a random sample of size N from the the normal (gaussian) distribution with MEAN = 0 and STANDARD DEVIATION = 1. This distribution is defined for all X and has the probability density function F(X) = (1/SQRT(2*PI))*EXP(-X*X/2). INPUT ARGUMENTS--N = The desired integer number of random numbers to be generated. --ISTART = An integer flag code which (if set to 0) will start the generator over and hence produce the same random sample over and over again upon successive calls to this subroutine within a run; or (if set to some integer value not equal to 0, like, say, 1) will allow the generator to continue from where it stopped and hence produce different random samples upon successive calls to this subroutine within a run. OUTPUT ARGUMENTS--X = A single precision vector (of dimension at least N) into which the generated random sample will be placed. OUTPUT--A random sample of size N from the normal distribution with MEAN = 0 and STANDARD DEVIATION = 1. PRINTING--None unless an input argument error condition exists. RESTRICTIONS--There is no restriction on the maximum value of N for this subroutine. OTHER DATAPAC SUBROUTINES NEEDED--UNIRAN. FORTRAN LIBRARY SUBROUTINES NEEDED--ALOG, SQRT, SIN, COS. MODE OF INTERNAL OPERATIONS--Single precision. LANGUAGE--ANSI FORTRAN. METHOD--Box-Muller Algorithm. REFERENCES--Box and Muller, 'A Note on the Generation of Random Normal Deviates', Journal of the Assiciation for Computing Machinery, 1958, Pages 610-611. --Tocher, The Art of Simulation, 1963, Pages 33-34. --Hammersley and Handcomb Monte Carlo Methods, 1964, Page 39. --Johnson and Kotz, Continuous Univariate Distributions--1, 1970, Pages 40-111. WRITTEN BY--James J. Filliben Statistical Engineering Laboratory (205.03) National Bureau of Standards Gaithersburg, MD 20899 Phone-- 301-921-2315 ORIGINAL VERSION--June 1972. UPDATED --September 1975. UPDATED --November 1975. UPDATED --July 1976.