toms370


toms370, a FORTRAN77 code which implements ACM toms algorithm 370, for producing random samples from an arbitrary Probability Density Function (PDF).

The text of many ACM toms algorithms is available online through ACM: http://www.acm.org/pubs/calgo or NETLIB: http://www.netlib.org/toms/index.html.

Usage:

call randg ( l, x, r, y )
where L is a nonzero odd seed value, which is updated on output, X is a vector of length 257, prepared by RANDGI, R is a vector of length 256, prepared by RANDGI, Y is output as a random value sampled from the PDF.

Licensing:

The computer code and data files described and made available on this web page are distributed under the GNU LGPL license.

Languages:

toms370 is available in a FORTRAN77 version.

Related Data and Programs:

toms370_test

normal, a FORTRAN77 library which includes routines for sampling normal PDF's.

PROB, a FORTRAN90 library which contains routines for sampling from a wide range of PDF's.

UNIFORM, a FORTRAN77 library which includes routines for sampling uniform PDF's.

Reference:

  1. Edgar Butler,
    Algorithm 370: General Random Number Generator,
    Communications of the ACM,
    Volume 13, Number 1, January 1970, pages 49-52.
  2. LG Proll,
    Remark on Algorithm 370,
    General Random Number Generator,
    Communications of the ACM,
    ?.

Source Code:


Last revised on 10 November 2023.