(index ("random-integer" 0) ("random-fixnum" 394) ("random" 771) ("random-real" 948) ("randomize" 1138) ("randomize/device" 1511))
(def (sig (procedure "(random-integer N)" (id random-integer))) (p "Return a random integer in the range " (tt "0 .. N-1") ", where N is a fixnum or an integer flonum.") (p "When N is a fixnum, this is equivalent to " (tt "random-fixnum") ".") (p "Otherwise, the result is returned as an integer flonum with 52 bits of precision.  No attempt is made to coerce the result to an exact number."))
(def (sig (procedure "(random-fixnum N)" (id random-fixnum))) (p "Return a fixnum in the range " (tt "0 .. N-1") ", where N is an exact integer.") (p "On a 32-bit system, the range is " (tt "0 .. 2^30-2") ".") (p "On a 64-bit system, the range is " (tt "0 .. 2^62-2") ".  There are at most 53 bits of precision, so when " (tt "N >= 2^53") " there will be gaps in the range."))
(def (sig (procedure "(random N)" (id random))) (p "Alias for " (tt "random-fixnum") ".  This allows you to override the core " (tt "random") " with") (pre "(use random-bsd)"))
(def (sig (procedure "(random-real)" (id random-real))) (p "Return a random floating-point number in the range " (tt "0.0 <= x < 1.0") ". The result will have double precision (53 bits)."))
(def (sig (procedure "(randomize [seed])" (id randomize))) (p "Seed the generator with integer SEED.  If seed is not provided or " (tt "#f") ", the generator is seeded with a combination of the current time (seconds and milliseconds) and process ID.") (p (tt "(randomize)") " is automatically called at module load time so it is not normally necessary to call it again."))
(def (sig (procedure "(randomize/device)" (id randomize/device))) (p "Seed the generator with external entropy.  Currently, random data is obtained by reading " (tt "/dev/random") " and used to initialize the generator state.  If " (tt "/dev/random") " is not present, it falls back to seeding with the current time and PID.  This is like calling " (tt "srandomdev(3)") ".") (p "On some systems, reading from " (tt "/dev/random") " will block if there is insufficient entropy in the pool."))
