package make-random

  1. Overview
  2. Docs

Module MakeRandom.Basic30Source

Parameters

module B : Bits.Basic30

Signature

Sourceval bits : unit -> int

Return 30 random bits in a nonnegative integer.

Sourceval 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.

Sourceval int32 : Int32.t -> Int32.t

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

Sourceval nativeint : Nativeint.t -> Nativeint.t

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

Sourceval int64 : Int64.t -> Int64.t

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

Sourceval 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.

Sourceval bool : unit -> bool

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