Random numbers from the geometric distribution (number of failures before the first success). Equivalent to R's rgeom().
rgeom()
Number of values to generate (fractions are truncated, as in R).
Probability of success in each trial, in (0, 1].
An array of n values; NaN for invalid parameters.
n
NaN
setSeed(1);rgeom(5, 0.3); // [1, 1, 7, 0, 3] Copy
setSeed(1);rgeom(5, 0.3); // [1, 1, 7, 0, 3]
Random numbers from the geometric distribution (number of failures before the first success). Equivalent to R's
rgeom().