LGNRAN SUBROUTINE LGNRAN(N,ISTART,X) PURPOSE--This subroutine generates a random sample of size N from the lognormal distribution. The prototype lognormal distribution used herein has MEAN = SQRT(E) = 1.64872127 and STANDARD DEVIATION = SQRT(E*(E-1)) = 2.16119742. This distribution is defined for all positive X and has the probability density vfunction F(X) = (1/(X*SQRT(2*PI))) * EXP(-ALOG(X)*ALOG(X)/2) the prototype lognormal distribution used herein is the distribution of the variate X = EXP(Z) where the variate Z is normally distributed with MEAN = 0 and STANDARD DEVIATION = 1. 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 lognormal distribution with MEAN = SQRT(E) = 1.64872127 and STANDARD DEVIATION = SQRT(E*(E-1)) = 2.16119742. 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, EXP. MODE OF INTERNAL OPERATIONS--Single precision. LANGUAGE--ANSI FORTRAN. REFERENCES--Tocher, The Art of Simulation, 1963, Pages 14-15. --Hammersley and Handcomb Monte Carlo Methods, 1964, Page 36. --Cramer, Mathematical Methods of Statistics, 1946, Pages 219-220. --Johnson and Kotz, Continuous Univariate Distributions--1, 1970, Pages 112-136. --Hasting and Peacock, Statistical Distributions--A Handbook for Students and Practitioners, 1975, Page 88. WRITTEN BY--James J. Filliben Statistical Engineering Laboratory (205.03) National Bureau of Standards Gaithersburg, MD 20899 Phone-- 301-921-2315 ORIGINAL VERSION--November 1975. UPDATED --July 1976.