bernoulli

Crates.iobernoulli
lib.rsbernoulli
version0.1.0
sourcesrc
created_at2021-10-18 06:21:17.210012
updated_at2021-10-18 06:21:17.210012
descriptionAn exact Bernoulli distribution.
homepage
repositoryhttps://github.com/Popog/bernoulli
max_upload_size
id466569
size16,654
(Popog)

documentation

https://docs.rs/bernoulli

README

Bernoulli

A generic replacement for rand::distributions::Bernoulli which uses exact precision instead of a 64-bit approximation, bernoulli::BernoulliExact<T> provides an exact distribution for any rational value representable by T.

BernoulliExact<u32> performs on-par with Bernoulli, though with a non-trivial memory overhead.

Type Size
Bernoulli 8 bytes
BernoulliExact<u32> 20 bytes
BernoulliExact<u8> 5 bytes
Commit count: 1

cargo fmt