package splittable_random

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Splittable_random.Log_uniformSource

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

Sourceval int32 : State.t -> lo:Base.int32 -> hi:Base.int32 -> Base.int32
Sourceval int64 : State.t -> lo:Base.int64 -> hi:Base.int64 -> Base.int64