:- use_module(library(random)).(can be autoloaded)
For compatibility reasons with older versions of this library,
setrand/1 also accepts
rand(A,B,C), where A, B and C are integers in the
range 1..30,000. This argument is used to seed the random generator.
existence_error(random_state, _)is raised if the underlying infrastructure cannot fetch the random state. This is currently the case if SWI-Prolog is not compiled with the GMP library.
- See also
- set_random/1 and random_property/1 provide the SWI-Prolog native implementation.