# RANDLC NAS Parallel Benchmark Pseudorandom Number Generator

RANDLC is a FORTRAN90 library which implements a version of the random number generator (RNG) used by the NAS Parallel Benchmarks.

The generator has the form

```        X(K+1) = A * X(K) mod 2^46
```
where the suggested value of the multiplier A is 5^13 = 1220703125.

This scheme generates 2^44 numbers before repeating.

The web site for the NAS Parallel Benchmarks is http://www.nas.nasa.gov/Resources/Software/npb.html.

### Languages:

RANDLC is available in a C version and a C++ version and a FORTRAN90 version and a MATLAB version and a Python version.

### Related Data and Programs:

ASA183, a FORTRAN90 library which implements the Wichman-Hill random number generator (RNG).

F90_RANDOM, FORTRAN90 programs which illustrate the use of Fortran's random number generator (RNG) routines.

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

RANDOM_SORTED, a FORTRAN90 library which generates vectors of random values which are already sorted.

RANLIB, a FORTRAN90 library which produces random samples from Probability Density Functions (PDF's), including Beta, Chi-square Exponential, F, Gamma, Multivariate normal, Noncentral chi-square, Noncentral F, Univariate normal, random permutations, Real uniform, Binomial, Negative Binomial, Multinomial, Poisson and Integer uniform, by Barry Brown and James Lovato.

RNGLIB, a FORTRAN90 library which implements a random number generator (RNG) with splitting facilities, allowing multiple independent streams to be computed, by L'Ecuyer and Cote.

UNIFORM, a FORTRAN09 library which computes elements of a pseudorandom sequence.

### Reference:

1. David Bailey, Eric Barszcz, John Barton, D Browning, Robert Carter, Leonardo Dagum, Rod Fatoohi, Samuel Fineberg, Paul Frederickson, Thomas Lasinski, Robert Schreiber, Horst Simon, V Venkatakrishnan, Sisira Weeratunga,
The NAS Parallel Benchmarks,
RNR Technical Report RNR-94-007, March 1994.
2. Donald Knuth,
The Art of Computer Programming, Volume 2, Seminumerical Algorithms,
Third Edition,
ISBN: 0201896842,
LC: QA76.6.K64.

### List of Routines:

• RANDLC returns a uniform pseudorandom value.
• RANDLC_JUMP returns the K-th element of a uniform pseudorandom sequence.
• TIMESTAMP prints the current YMDHMS date as a time stamp.

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

Last revised on 06 January 2011.