FRANNOR - functions to generate a pseudo-random float normally distributed
with N(0,1); i.e., with zero mean and unit variance.
frannor return a normally distributed random float
srannor seed random number generator for normal distribution
Function Prototypes:
float frannor (void);
void srannor (int seed);
frannor:
Input: (none)
Returned: normally distributed random float
srannor:
Input:
seed different seeds yield different sequences of random numbers.
Notes:
Adapted from subroutine rnor in Kahaner, Moler and Nash (1988)
which in turn was based on an algorithm by
Marsaglia and Tsang (1984).
References:
Numerical Methods and Software", D.
Kahaner, C. Moler, S. Nash, Prentice Hall, 1988.
Marsaglia G. and Tsang, W. W., 1984,
A fast, easily implemented method for sampling from decreasing or symmetric
unimodal density functions: SIAM J. Sci. Stat. Comput., v. 5, no. 2,
p. 349-359.
Author: Dave Hale, Colorado School of Mines, 01/21/89