&optionalrandom-state → random-number
The random-state, which is modified by this function, encodes the internal state maintained by the random number generator.
An approximately uniform choice distribution is used. If limit is an integer, each of the possible results occurs with (approximate) probability
(<= 0 (random 1000) 1000)
The random-state is modified.
See Common Lisp the Language for information about generating random numbers.