URAND: A Universal Random Number Generator
Abstract
A subroutine for generating uniformly-distributed floating-point numbers in the interval (0,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 of m to the base 2 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.
Document Details
- Document Type
- Technical Report
- Publication Date
- Jan 01, 1973
- Accession Number
- AD0757366
Entities
People
- Cleve B. Moler
- Michael A. Malcolm
Organizations
- Stanford University