module State : sig ... end
Produce a random number uniformly distributed in the given inclusive range. (In the case of float
, hi
may or may not be attainable, depending on rounding.)
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
val float : State.t -> lo:Base.float -> hi:Base.float -> Base.float
val unit_float : State.t -> Base.float
unit_float state = float state ~lo:0. ~hi:1.
, but slightly more efficient (and right endpoint is exclusive).
module Log_uniform : sig ... end