FRANUNI - Functions to generate a pseudo-random float uniformly distributed
on [0,1); i.e., between 0.0 (inclusive) and 1.0 (exclusive)
franuni return a random float
sranuni seed random number generator
Function Prototypes:
float franuni (void);
void sranuni (int seed);
franuni:
Input: (none)
Returned: pseudo-random float
sranuni:
seed different seeds yield different sequences of random numbers.
Notes:
Adapted from subroutine uni in Kahaner, Moler, and Nash (1988).
This book references a set of unpublished notes by
Marsaglia.
According to the reference, this random
number generator "passes all known tests and has a period that is ...
approximately 10^19".
References:
Numerical Methods and Software", D. Kahaner, C. Moler, S. Nash,
Prentice Hall, 1988.
Marsaglia G., "Comments on the perfect uniform random number generator
Unpublished notes, Wash S. U.
Author: Dave Hale, Colorado School of Mines, 12/30/89