Random numbers

Author(s): Daniel Cabeza.

This module provides predicates for generating pseudo-random numbers

Usage and interface

Documentation on exports

PREDICATErandom/1
random(Number)

Number is a (pseudo-) random number in the range [0.0,1.0]

Usage:

PREDICATErandom/3
random(Low,Up,Number)

Number is a (pseudo-) random number in the range [Low, Up]

Usage 1:

If Low and Up are integers, Number is an integer.

Usage 2:

Usage 3:

PREDICATEsrandom/1
srandom(Seed)

Changes the sequence of pseudo-random numbers according to Seed. The stating sequence of numbers generated can be duplicated by calling the predicate with Seed unbound (the sequence depends on the OS).

Usage: