-
-
Notifications
You must be signed in to change notification settings - Fork 470
Closed
Labels
E-easyParticipation: easy jobParticipation: easy jobF-new-intFunctionality: new, within RandFunctionality: new, within Rand
Description
Add a Bernoulli distribution (i.e. boolean with probability p).
This is basically just rng.gen() < p
, but the uniform distribution used to generate a float has precision limited to ε
(smallest representable number above 1); we can do better.
We may decide not to implement this as a distribution but with a simple function calling rng.sample(HighPrecision01) < p
or similar.
See also #293: add Rng::gen_bool
or similar
Metadata
Metadata
Assignees
Labels
E-easyParticipation: easy jobParticipation: easy jobF-new-intFunctionality: new, within RandFunctionality: new, within Rand