The OpenD Programming Language

randExponential2

  1. T randExponential2(G gen)
  2. T randExponential2(G* gen)
    T
    randExponential2
    (
    T
    G
    )
    (
    scope G* gen
    )
  3. T randExponential2()

Parameters

gen G*

saturated random number generator

Return Value

Type: T

X ~ Exp(1) / log(2). Note: fabs can be used to get a value from positive interval [0, 2^^boundExp$(RPAREN).

Examples

auto v = randExponential2!double;
import mir.random.engine.xorshift;
auto gen = Xorshift(1);
auto v = gen.randExponential2!double();

Meta