Provided by: ocaml-nox_3.12.1-2ubuntu2_amd64

**NAME**

Random - Pseudo-random number generators (PRNG).

**Module**

Module Random

**Documentation**

ModuleRandom:sigendPseudo-random number generators (PRNG).===Basicfunctions===valinit:int->unitInitialize the generator, using the argument as a seed. The same seed will always yield the same sequence of numbers.valfull_init:intarray->unitSame asRandom.initbut takes more data as seed.valself_init:unit->unitInitialize the generator with a more-or-less random seed chosen in a system-dependent way.valbits:unit->intReturn 30 random bits in a nonnegative integer.Before3.12.0used a different algorithm (affects all the following functions)valint:int->intRandom.intboundreturns a random integer between 0 (inclusive) andbound(exclusive).boundmust be greater than 0 and less than 2^{30.valint32:Int32.t->Int32.tRandom.int32boundreturns a random integer between 0 (inclusive) andbound(exclusive).boundmust be greater than 0.valnativeint:Nativeint.t->Nativeint.tRandom.nativeintboundreturns a random integer between 0 (inclusive) andbound(exclusive).boundmust be greater than 0.valint64:Int64.t->Int64.tRandom.int64boundreturns a random integer between 0 (inclusive) andbound(exclusive).boundmust be greater than 0.valfloat:float->floatRandom.floatboundreturns a random floating-point number between 0 (inclusive) andbound(exclusive). Ifboundis negative, the result is negative or zero. Ifboundis 0, the result is 0.valbool:unit->boolRandom.bool()returnstrueorfalsewith probability 0.5 each.===Advancedfunctions======ThefunctionsfrommoduleStatemanipulatethecurrentstateoftherandomgeneratorexplicitely.ThisallowsusingoneorseveraldeterministicPRNGs,eveninamulti-threadedprogram,withoutinterferencefromotherpartsoftheprogram.===moduleState:sigendvalget_state:unit->State.tReturn the current state of the generator used by the basic functions.valset_state:State.t->unitSet the state of the generator used by the basic functions.