Report Number: CS-TR-73-334
Institution: Stanford University, Department of Computer Science
Title: URAND: a universal random number generator.
Author: Malcolm, Michael A.
Author: Moler, Cleve B.
Date: January 1973
Abstract: A subroutine for generating uniformly-distributed floating-point numbers in the interval [O,1) is presented in ANSI standard Fortran. The subroutine, URAND, is designed to be relatively machine independent. URAND has undergone minimal testing on various machines and is thought to work properly on any machine having binary integer number representation, integer multiplication modulo m and integer addition either modulo m or yielding at least ${log}_2$ (m) significant bits, where m is some integral power of 2. Upon the first call of URAND, the value of m is automatically determined and appropriate constants for a linear congruential generator are computed following the suggestions of D. E. Knuth, volume 2. URAND is guaranteed to have a full-length cycle. Readers are invited to apply their favorite statistical tests to URAND, using any binary machine, and report the results to the authors.