Working Paper

Portable random number generators


Abstract: Computers are deterministic devices, and a computer-generated random number is a contradiction in terms. As a result, computer-generated pseudorandom numbers are fraught with peril for the unwary. We summarize much that is known about the most well-known pseudorandom number generators: congruential generators. We also provide machine-independent programs to implement the generators in any language that has 32-bit signed integers-for example C, C++, and FORTRAN. Based on an extensive search, we provide parameter values better than those previously available.

Keywords: Programming (Mathematics); Computers;

Access Documents

Authors

Bibliographic Information

Provider: Federal Reserve Bank of Atlanta

Part of Series: FRB Atlanta Working Paper

Publication Date: 1999

Number: 99-14