Skip to content

Pattern: PRandomExponential

Random uniform on exponential curve between min and max,

both of which must be strictly positive. If values are given as floats, output values are also floats < max. If values are ints, output values are ints <= max (as random.randint)

Example output

>>> PRandomExponential(1, 100).nextn(16)
[3, 2, 12, 1, 6, 13, 14, 25, 78, 78, 4, 49, 5, 97, 69, 12]
>>> PRandomExponential(1.0, 100.0).nextn(16)
[54.84880471711992, 89.53150541306805, 2.4077905492103318, ... ]