NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
crates.io · #644 most downloaded on crates.io
Sampling from random number distributions
Last release 7 months ago
10 Feb 2026
Ships unpredictably
gaps range from 2 weeks to 2.1 years
Nearly every release is documented
notes for 9 of 9 stable releases
2 versions withdrawn
withdrawn after publishing
7 years old
20 releases · first in 2019
Update rand 0.10
Update rand 0.10 (#50)
rand ([#28])rand to version 0.10.0 ([#31], [#48])MultiDistribution trait to sample more efficiently from multi-dimensional distributions ([#18])WeightedAliasIndex::weights() to reconstruct the original weights in O(n) ([#25])ConstMultiDistribution trait as support for fixed-dimension distributions ([#29])Dirichlet into the new multi module and implement MultiDistribution for it ([#18])Dirichlet no longer uses const generics, which means that its size is not required at compile time. Essentially a revert of [rand#1292]. ([#30])Geometric::new for small p > 0 where 1 - p rounds to 1 ([#36])direct-minimal-versions ([#38])FisherF::new on almost zero parameters ([#39])NormalInverseGaussian::new with very large alpha; this is a Value-breaking change ([#40])Zipf::new on invalid parameters ([#41])Binomial::sample with n ≥ 2^63; this is a Value-breaking change ([#43])-inf output for Exp when lambda is -0.0 ([#44])Gamma::sample; this is a Value-breaking change and also affects ChiSquared and Dirichlet ([#46])One column per quarter.
Nothing published for this version
Fix missing import for no_std builds by @ralphtandetzky in #13
no_std builds by @ralphtandetzky in #13Full Changelog: 0.5.0...0.5.1
no_std buildsFix bug in Hypergeometric , this is a Value-breaking change
--ignore-rust-versionrand v0.9.0 (#1558)serde1 to serde (#1477)PartialEq (#1218)Dirichlet now uses const generics, which means that its size is required at compile time (#1292)Dirichlet::new_with_size constructor was removed (#1292)WeightedIndexTree (#1372, #1444)PertBuilder to allow specification of mean or mode (#1452)Zeta's parameter a to s (#1466)WeightError, PoissonError, BinomialError as #[non_exhaustive] (#1480)isize as a WeightedAliasIndex weight (#1487)Zipf::new: n is now floating-point (#1518)Slice -> slice::Choose, EmptySlice -> slice::Empty (#1548)DistString -> SampleString (#1548)DistIter -> Iter, DistMap -> Map (#1548){Weight, WeightError, WeightedIndex} -> weighted::{Weight, Error, WeightedIndex} (#1548)weighted_alias::{AliasableWeight, WeightedAliasIndex} -> weighted::{..} (#1548)weighted_tree::WeightedTreeIndex -> weighted::WeightedTreeIndex (#1548)Poisson doesn't return -1.0 for small lambda (#1284)Poisson distribution instantiation so it return an error if lambda is infinite (#1291)Binomial distribution (#1325)Pert distribution where mode is close to (min + max) / 2 (#1452)Poisson to solve (#1312) (#1498)Hypergeometric, this is a Value-breaking change (#1510)Gamma, NormalInverseGaussian and Zipf distributions (#1184)rand_distr distributions to documentation (#1434)sample to new (#1484)Poisson's rejection method to improve performance and correct sampling inaccuracies for large lambda values, this is a Value-breaking change (#1560)--ignore-rust-versionrand v0.9.0 ([rand#1558])serde1 to serde ([rand#1477])PartialEq ([rand#1218])Dirichlet now uses const generics, which means that its size is required at compile time ([rand#1292])Dirichlet::new_with_size constructor was removed ([rand#1292])WeightedIndexTree ([rand#1372], [rand#1444])PertBuilder to allow specification of mean or mode ([rand#1452])Zeta's parameter a to s ([rand#1466])WeightError, PoissonError, BinomialError as #[non_exhaustive] ([rand#1480])isize as a WeightedAliasIndex weight ([rand#1487])Zipf::new: n is now floating-point ([rand#1518])Slice -> slice::Choose, EmptySlice -> slice::Empty ([rand#1548])DistString -> SampleString ([rand#1548])DistIter -> Iter, DistMap -> Map ([rand#1548]){Weight, WeightError, WeightedIndex} -> weighted::{Weight, Error, WeightedIndex} ([rand#1548])weighted_alias::{AliasableWeight, WeightedAliasIndex} -> weighted::{..} ([rand#1548])weighted_tree::WeightedTreeIndex -> weighted::WeightedTreeIndex ([rand#1548])Poisson doesn't return -1.0 for small lambda ([rand#1284])Poisson distribution instantiation so it return an error if lambda is infinite ([rand#1291])Binomial distribution ([rand#1325])Pert distribution where mode is close to (min + max) / 2 ([rand#1452])Poisson to solve ([rand#1312]) ([rand#1498])Hypergeometric, this is a Value-breaking change ([rand#1510])Gamma, NormalInverseGaussian and Zipf distributions ([rand#1184])
This breaks serialization compatibility with older versions.rand_distr distributions to documentation ([rand#1434])sample to new ([rand#1484])Poisson's rejection method to improve performance and correct sampling inaccuracies for large lambda values, this is a Value-breaking change ([rand#1560])Move Slice -> slice::Choose , EmptySlice -> slice::Empty
Slice -> slice::Choose, EmptySlice -> slice::EmptyDistString -> SampleStringDistIter -> Iter, DistMap -> Map{Weight, WeightError, WeightedIndex} -> weighted::{Weight, Error, WeightedIndex}weighted_alias::{AliasableWeight, WeightedAliasIndex} ->weighted::{..}weighted_tree::WeightedTreeIndex ->weighted::WeightedTreeIndexUpdate: getrandom v0.3.0 rc.0
Update: getrandom v0.3.0 rc.0 (#1541)
Fix docs.rs build options
Fix docs.rs build options (#1539)
Update version numbers Update CHANGELOGs Add an extra benchmark
rand_distr 0.5.0-alpha.3 - fix doc build
rand_distr 0.5.0-alpha.3 - fix doc build
Nothing published for this version
Nothing published for this version
Also: add pull-request template
Also: add pull-request template
- Fix no_std build ([rand#1208])
no_std build ([rand#1208])New Zeta and Zipf distributions ([rand#1136])
Zeta and Zipf distributions ([rand#1136])SkewNormal distribution ([rand#1149])Gumbel and Frechet distributions ([rand#1168], [rand#1171])Empirically test PDF of normal distribution ([rand#1121])
no_std support ([rand#1100])std_math feature to prefer std over libm for floating point math ([rand#1100])Error, Display, Clone, Copy, PartialEq and Eq as appropriate ([rand#1126])New Geometric, StandardGeometric and Hypergeometric distributions ([rand#1062])
rand to v0.8.0Geometric, StandardGeometric and Hypergeometric distributions ([rand#1062])Beta sampling algorithm for improved performance and accuracy ([rand#1000])Normal and LogNormal now support from_mean_cv and from_zscore ([rand#1044])NormalError changed ([rand#1044])Move alias method for WeightedIndex from rand ([rand#945])
WeightedIndex from rand ([rand#945])WeightedIndex to WeightedAliasIndex ([rand#1008])Float trait with num-traits::Float ([rand#987])no_std support via num-traits math functions ([rand#987])Distribution<u64> impl for Poisson ([rand#987])Dirichlet and alias_method to use boxed slice instead of Vec ([rand#987])lambda = 0 in the parametrization of Exp ([rand#972])rustfmt::skip ([rand#926])std::error::Error ([rand#919])rand::distributions::BernoulliError ([rand#919])Fix version requirement on rand lib ([rand#847])
Update dependency to support Rand 0.7
Remove new constructors for zero-sized types
new constructors for zero-sized typesPoissonResults instead of panickingf32 support for most distributionsUnitSphereSurface to UnitSphereUnitBall and UnitDiscYour coding agent can read these notes before it upgrades. Set up the MCP server →