Random numbers from the exponential distribution. Equivalent to R's rexp().
rexp()
Number of values to generate (fractions are truncated, as in R).
Optional
Rate. Default 1.
1
An array of n values; NaN for invalid parameters.
n
NaN
setSeed(1);rexp(2, { rate: 2 }); // [0.3775909, 0.5908214] Copy
setSeed(1);rexp(2, { rate: 2 }); // [0.3775909, 0.5908214]
Random numbers from the exponential distribution. Equivalent to R's
rexp().