Legend:
Library
Module
Module type
Parameter
Class
Class type
Library
Module
Module type
Parameter
Class
Class type
val int : State.t -> lo:Base.int -> hi:Base.int -> Base.int
Produce a random number in the given inclusive range, where the number of bits in the representation is chosen uniformly based on the given range, and then the value is chosen uniformly within the range restricted to the chosen bit width. Raises if lo < 0 || hi < lo
.
These functions are useful for choosing numbers that are weighted low within a given range.
val int32 : State.t -> lo:Base.int32 -> hi:Base.int32 -> Base.int32
val int63 : State.t -> lo:Base.Int63.t -> hi:Base.Int63.t -> Base.Int63.t
val int64 : State.t -> lo:Base.int64 -> hi:Base.int64 -> Base.int64
val nativeint :
State.t ->
lo:Base.nativeint ->
hi:Base.nativeint ->
Base.nativeint