package make-random

  1. Overview
  2. Docs

Parameters

module B : Bits.Basic30

Signature

val bits : unit -> int

Return 30 random bits in a nonnegative integer.

val int : int -> int

int bound returns a random integer between 0 (inclusive) and bound (exclusive). bound must be greater than 0 and less than 230.

val int32 : Stdlib.Int32.t -> Stdlib.Int32.t

int32 bound returns a random integer between 0 (inclusive) and bound (exclusive). bound must be greater than 0.

val nativeint : Stdlib.Nativeint.t -> Stdlib.Nativeint.t

nativeint bound returns a random integer between 0 (inclusive) and bound (exclusive). bound must be greater than 0.

val int64 : Stdlib.Int64.t -> Stdlib.Int64.t

int64 bound returns a random integer between 0 (inclusive) and bound (exclusive). bound must be greater than 0.

val float : float -> float

float bound returns a random floating-point number between 0 and bound (inclusive). If bound is negative, the result is negative or zero. If bound is 0, the result is 0.

val bool : unit -> bool

bool () returns true or false with probability 0.5 each.