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:
-
A multiply-with-carry (MWC) generator
x(n) = a * x(n-1) + carry mod 2^32;
-
A multiply-with-carry (MWC) generator on pairs of 16 bits;
-
The "Mother of all random number generators";
-
The KISS generator;
-
The simple but very good generator COMBO;
-
The lagged Fibonacci-MWC combination ULTRA;
-
A combination multiply-with-carry/subtract-with-borrow
(SWB) generator, period ~ 10^364;
-
An extended congruential generator;
-
The Super-Duper generator;
-
A subtract-with-borrow generator;
-
Any specified congruential generator;
-
The 31-bit generator ran2 from Numerical Recipes;
-
Any specified shift-register generator, 31 or 32 bits;
-
The system generator in Sun Fortran f77;
-
Any lagged-Fibonacci generator, x(n) = x(n-r) op x(n-s);
-
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:
-
George Marsaglia, A. Zaman,
Monkey Tests for Random Number Generators,
Computers and Mathematics with Applications,
Volume 9, Number 9, 1995, pages 1-10.
-
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;
-
input01.txt,
input to make an example of generator 1.
-
output01.txt,
the printed output. This does not include the data file "mwc1.32"
that is also created.
Generator 2 is a multiply-with-carry (MWC) generator
on pairs of 16 bits;
-
input02.txt,
input to make an example of generator 2.
-
output02.txt,
the printed output. This does not include the data file "1616.32"
that is also created.
List of Routines:
-
MAIN is the main program for RANDOM_WRITE.
-
IRAN2 is a random number generator from Numerical Recipes.
-
KS_TEST applies the Kolmorogov-Smirnov test.
-
MAKE_1616 generates data from two 16 bit multiply-with-carry generators.
-
MAKE_CMBO generates data from the COMBO generator.
-
MAKE_CONG generates data from a congruential generator.
-
MAKE_FIBO generates data from a lagged Fibonacci generator.
-
MAKE_INVC generates data from an inverse congruential generator.
-
MAKE_KISS generates data from the KISS generator.
-
MAKE_LTRA generates data from the ULTRA generator.
-
MAKE_MTHR generates data from the "mother of all generators" generator.
-
MAKE_MWC1 generates data from a multiply-with-carry generator.
-
MAKE_RAN2 generates data from a Numerical Recipes generator.
-
MAKE_SBMC generates data from a subtract/borrow/multiply/carry generator.
-
MAKE_SHRG generates data from a specified shift register generator.
-
MAKE_SUNR generates data from the Sun f77 generator.
-
MAKE_SUPR generates data from the superduper generator.
-
MAKE_SWB generates data from a subtract-with-borrow generator.
-
MAKE_XCNG generates data from an extended congruential generator.
-
PLOT1 makes a printer plot of data.
-
PROD ???
-
R8_SWAP swaps two R8's.
-
R8VEC_HEAP_D reorders an R8VEC into an descending heap.
-
R8VEC_SORT_HEAP_A ascending sorts an R8VEC using heap sort.
-
SP is called by KS_TEST.
-
SUMMER computes X(1:4) + Y(1:4).
You can go up one level to
the FORTRAN90 source codes.
Last revised on 19 January 2011.