Author(s): Daniel Cabeza.
This module provides predicates for generating pseudo-random numbers
random
)random
)
random(Number)
Number
is a (pseudo-) random number in the range [0.0,1.0]
The predicate is of type implicit.
Usage: random(-(float))
random(Low,Up,Number)
Number
is a (pseudo-) random number in the range [Low
, Up
]
The predicate is of type implicit.
Usage 1: random(+int,+int,-(int))
Low
and Up
are integers, Number
is an integer.
Usage 2: random(+flt,+num,-(flt))
Usage 3: random(+int,+flt,-(flt))
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).
The predicate is of type implicit.
Usage: srandom(?(int))
Go to the first, previous, next, last section, table of contents.