RANDOM_WRITE
Random Integer Data for DIEHARD


RANDOM_WRITE is a FORTRAN90 program which makes a file of pseudorandom 32 bit integers for input to the DIEHARD program.

Choices of generators include:

  1. A multiply-with-carry (MWC) generator x(n) = a * x(n-1) + carry mod 2^32;
  2. A multiply-with-carry (MWC) generator on pairs of 16 bits;
  3. The "Mother of all random number generators";
  4. The KISS generator;
  5. The simple but very good generator COMBO;
  6. The lagged Fibonacci-MWC combination ULTRA;
  7. A combination multiply-with-carry/subtract-with-borrow (SWB) generator, period ~ 10^364;
  8. An extended congruential generator;
  9. The Super-Duper generator;
  10. A subtract-with-borrow generator;
  11. Any specified congruential generator;
  12. The 31-bit generator ran2 from Numerical Recipes;
  13. Any specified shift-register generator, 31 or 32 bits;
  14. The system generator in Sun Fortran f77;
  15. Any lagged-Fibonacci generator, x(n) = x(n-r) op x(n-s);
  16. An inverse congruential generator;

Languages:

RANDOM_WRITE is available in a FORTRAN90 version

Related Data and Programs:

CVT, a FORTRAN90 library which computes elements of a Centroidal Voronoi Tessellation.

FAURE, a FORTRAN90 library which computes elements of a Faure quasirandom sequence.

GRID, a FORTRAN90 library which computes elements of a grid dataset.

HALTON, a FORTRAN90 library which computes elements of a Halton quasirandom sequence.

HAMMERSLEY, a FORTRAN90 library which computes elements of a Hammersley quasirandom sequence.

HEX_GRID, a FORTRAN90 library which computes elements of a hexagonal grid dataset.

HEX_GRID_ANGLE, a FORTRAN90 library which computes elements of an angled hexagonal grid dataset.

IEEE_UNIFORM, a FORTRAN90 library which tries to uniformly sample the discrete set of values that represent the legal IEEE real numbers;

IHS, a FORTRAN90 library which computes elements of an improved distributed Latin hypercube dataset.

LATIN_CENTER, a FORTRAN90 library which computes elements of a Latin Hypercube dataset, choosing center points.

LATIN_EDGE, a FORTRAN90 library which computes elements of a Latin Hypercube dataset, choosing edge points.

LATIN_RANDOM, a FORTRAN90 library which computes elements of a Latin Hypercube dataset, choosing points at random.

LCVT, a FORTRAN90 library which computes a latinized Centroidal Voronoi Tessellation.

NIEDERREITER2, a FORTRAN90 library which computes elements of a Niederreiter quasirandom sequence with base 2.

NORMAL, a FORTRAN90 library which computes elements of a sequence of pseudorandom normally distributed values.

SOBOL, a FORTRAN90 library which computes elements of a Sobol quasirandom sequence.

SUBPAK, a FORTRAN90 library which includes a routine random_initialize that can be used to try to initialize the seed for the FORTRAN90 random number generator.

UNIFORM, a FORTRAN90 library which computes elements of a pseudorandom uniform sequence.

UNIFORM_DATASET, a FORTRAN90 program which generates a dataset of uniform pseudorandom values and writes them to a file.

VAN_DER_CORPUT, a FORTRAN90 library which computes elements of a van der Corput quasirandom sequence.

Reference:

  1. George Marsaglia, A. Zaman,
    Monkey Tests for Random Number Generators,
    Computers and Mathematics with Applications,
    Volume 9, Number 9, 1995, pages 1-10.
  2. George Marsaglia, A. Zaman,
    Some Very-Long-Period Portable Random Number Generators,
    Computers in Physics,
    Volume 8, 1995, pages 117-121.

Source Code:

Examples and Tests:

Generator 1 is a multiply-with-carry (MWC) generator x(n) = a * x(n-1) + carry mod 2^32;

Generator 2 is a multiply-with-carry (MWC) generator on pairs of 16 bits;

List of Routines:

You can go up one level to the FORTRAN90 source codes.


Last revised on 19 January 2011.