You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit was created on GitHub.com and signed with GitHub’s verified signature.
Added
More distributions in Random (#8): lognormal(mu, sigma) with Random.lognormalParams(mean, stdDev), gamma(shape, scale) (Marsaglia-Tsang), erlang(k, mean), weibull(shape, scale), beta(alpha, beta), bernoulli(p), geometric(p), weightedChoice(items, weights), discrete([{ value, weight }]) and empirical(samples, { interpolate }). All are seeded from the same generator, validate their parameters with ValidationError, and document mean/variance in JSDoc. New exported types WeightedValue<T> and EmpiricalOptions.
Fixed
exponential(), normal() and the new log-based transforms draw from the open interval (0, 1), so they can no longer return Infinity or NaN on the one generator state per period that yields exactly 0.