<INTERFACE> The <CD/Rand/ structure <SEEALSO> <STRREF TOPID/Random/ </SEEALSO> <PP> The random</VALREF> and mkRandom are 31-bit words in the range [randMin, randMax] . In the current implementation, randMin is <MATH/1.0/ and randMax is <MATH/2<SUP/31/-2/. <SPEC> <TYPE><ID>rand<TY>Word31.word <SPEC> <VAL>randMin<TY>rand <VAL>randMax<TY>rand <COMMENT> <PP> These are the minimum and maximum values returned by <VALREF/random/ and <VALREF/mkRandom/. <SPEC> <VAL>random<TY>rand -> rand <COMMENT> <PROTOTY> random <ARG/r/ </PROTOTY> returns a random number in the range [randMin, randMax] using the seed <ARG/r/. Iteratively using the value returned by <VALREF/random/ as the next seed to <VALREF/random/ will produce a sequence of pseudo-random numbers. <SPEC> <VAL>mkRandom<TY>rand -> unit -> rand <COMMENT> <PROTOTY> mkRandom <ARG/r/ </PROTOTY> returns a stateful function generating a sequence of random numbers in the range [randMin, randMax] , starting from the seed <ARG/r/. <SPEC> <VAL>norm<TY>rand -> real <COMMENT> <PP> Uniformly maps the range [randMin, randMax] , to the range <MATH/(0.0,1.0)/. This can be used in combination with <CD/random/ or <CD/mkRandom/ to generate normalized real-valued random numbers. <SPEC> <VAL>range<TY>(int * int) -> rand -> int <RAISES> <PROTOTY> range (<ARG/i/, <ARG/j/) </PROTOTY> returns a function mapping the range [randMin, randMax] uniformly to the range <MATH/[<ARG/i/,<ARG/j/]/. This can be used in combination with <CD/random/ or <CD/mkRandom/ to generate random numbers in a given integer range. This raises the exception </INTERFACE>