next_bernoulli_ppm Interface

public interface next_bernoulli_ppm

Return true with probability ppm in a million.

ppm is clamped to [0, PPM_ONE], so 0 never fires and 1000000 always does, and no value in between can be mistyped into an error. Parts per million rather than a real probability because this reaches simulation state: an incident either happened or it did not, and two runs must agree on which.

Calls

interface~~next_bernoulli_ppm~~CallsGraph interface~next_bernoulli_ppm next_bernoulli_ppm proc~pcg32_next_bernoulli_ppm pcg32_next_bernoulli_ppm interface~next_bernoulli_ppm->proc~pcg32_next_bernoulli_ppm proc~splitmix64_next_bernoulli_ppm splitmix64_next_bernoulli_ppm interface~next_bernoulli_ppm->proc~splitmix64_next_bernoulli_ppm proc~pcg32_uniform_below pcg32_uniform_below proc~pcg32_next_bernoulli_ppm->proc~pcg32_uniform_below proc~splitmix64_uniform_below splitmix64_uniform_below proc~splitmix64_next_bernoulli_ppm->proc~splitmix64_uniform_below proc~pcg32_next_u64 pcg32_t%pcg32_next_u64 proc~pcg32_uniform_below->proc~pcg32_next_u64 proc~rejection_mask~2 rejection_mask proc~pcg32_uniform_below->proc~rejection_mask~2 proc~u64_less u64_less proc~pcg32_uniform_below->proc~u64_less proc~splitmix64_uniform_below->proc~rejection_mask~2 proc~splitmix64_next_u64 splitmix64_t%splitmix64_next_u64 proc~splitmix64_uniform_below->proc~splitmix64_next_u64 proc~splitmix64_uniform_below->proc~u64_less proc~pcg32_step pcg32_step proc~pcg32_next_u64->proc~pcg32_step proc~u64_shr u64_shr proc~rejection_mask~2->proc~u64_shr proc~splitmix64_next splitmix64_t%splitmix64_next proc~splitmix64_next_u64->proc~splitmix64_next proc~pcg32_step->proc~u64_shr proc~rotate_right32 rotate_right32 proc~pcg32_step->proc~rotate_right32 proc~u64_add u64_add proc~pcg32_step->proc~u64_add proc~u64_mul u64_mul proc~pcg32_step->proc~u64_mul proc~mix64 mix64 proc~splitmix64_next->proc~mix64 proc~splitmix64_next->proc~u64_add

Module Procedures

private function splitmix64_next_bernoulli_ppm(gen, ppm) result(r)

True with probability ppm in a million, from a splitmix64_t generator.

Arguments

Type IntentOptional Attributes Name
type(splitmix64_t), intent(inout) :: gen

Generator, advanced by the draw unless ppm is 0 or PPM_ONE.

integer(kind=default_int), intent(in) :: ppm

Probability in parts per million, clamped to [0, PPM_ONE].

Return Value logical

private function pcg32_next_bernoulli_ppm(gen, ppm) result(r)

True with probability ppm in a million, from a pcg32_t generator.

Arguments

Type IntentOptional Attributes Name
type(pcg32_t), intent(inout) :: gen

Generator, advanced by the draw unless ppm is 0 or PPM_ONE.

integer(kind=default_int), intent(in) :: ppm

Probability in parts per million, clamped to [0, PPM_ONE].

Return Value logical