5 The random Library

This library provides elaborate random number generation facilities. The random library contains random generators with different statistical distributions, such as uniform, normal, binomial and poison distributions.

The library offers facilities for specifying the seeds of the generator by the setsd operation.

The library offers facilities for maintaining up to 32 parallel random generators.

For more details, see the interface descriptions.

5.1 simple random generators: ignlgi and ranf

The simple random generator most often used (namely the uniform integer random generator) is in this library the ignlgi generator which returns a uniformly distributed integer in the range [1, 2147483562]. It is also available in the ignuin variant which returns a uniformly distributed integer in a range specified by the user.

Another simple and often used random generator is the uniform real random generator which in this library is available as the ranf generator which returns a uniformly distributed real in the range ]0, 1[ (i.e. 0 and 1 are never returned). The genunf variant returns a uniformly distributed real in a range specified by the user.


Basic Libraries - Reference Manual
© 1990-2002 Mjølner Informatics
[Modified: Friday October 6th 2000 at 12:00]