luxury.f90
Another generator of uniformly distributed random numbers. luxtst.f90
A program to test luxury.f90.
taus88.f90
L'Ecuyer's 1996 Tausworthe random number generator, and lfsr113.f90
L'Ecuyer's 1999 Tausworthe random number generator. The first has a cycle of
2^88 while the second is a little slower but has a cycle of 2^113. Both are
translations from C. N.B. These both assume that default integers are 32-bit.
lfsr258.f90
A 64-bit random number generator from Pierre L'Ecuyer with a cycle of about
2^258 or more than 10^77.
dprand.f90
Nick Maclaren's double precision random number generator, translated into
ELF90-compatible form.
mt19937.f90
The 'Mersenne Twister' random number generator from Japan with a cycle of
length (2^19937 - 1). mt19937a.f90 is a
version for compilers which stop when there are integer overflows, as some do
when compiler check options are enabled for debugging purposes. Before using
this module, you are advised to scan the Japanese web site
particularly under `Initialization'. mt19937.f90 was revised on 5 February
2002; mt19937a.f90 has not been revised.
rand3.f90 Yet
another random number generator; this one is based upon an algorithm by Donald
Knuth (1997).
freq2d.f90
Pairs of uniform random numbers should be uniformly distributed in the unit
square. This is a simple test program which failed using a new (1998)
compiler. ELF90-compatible.
Random numbers from other distributions
random.f90
A module for generating random numbers from a range of distributions. There is
a test program t_random.f90.
Another library for random number generation can be found at randlib.
ran_norm.f90
and rnorm.f90
Generate random numbers from the standard normal distribution. ran_norm uses
more random number calls, but rnorm uses more logarithms and square roots. On
those machine/compiler combinations which have been tested recently, rnorm has
usually been faster (5-20%).
r_gamma.f90
and rgamma.f90
Generate random numbers from the gamma distribution. The first routine is
adapted from Dagpunar's book, while the second is by Marsaglia and Bray.
ignpoi.f90
Generate random Poisson deviates. Requires ran_exp.f90.
ran_exp.f90
Generate random exponential deviates, simple method.
toms780.f90
Generate random exponential deviates; two algorithms from TOMS algorithm 780.
test780.f90
A program to compare speeds of 3 different generators.
t_kemp_b.f90
Generate random binomial deviates, including a small driver program.
zipf.f90
Generate discrete random deviates having the Zipf (or zeta) distribution, with
a small test program.
toms668.f90
The file for r_hyperg.f90 contains TOMS algorithm 668 for generating random
values from the hypergeometric distribution.
ziggurat.f90
George Marsaglia's functions for generating random samples from the uniform,
normal and exponential distributions. Translated from C.