Skip to content

Commit

Permalink
Change comparison operator to avoid problematic p=0 edge case
Browse files Browse the repository at this point in the history
  • Loading branch information
getzdan authored Nov 12, 2023
1 parent 7e232ca commit f935edc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/univariate/discrete/bernoulli.jl
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ cf(d::Bernoulli, t::Real) = failprob(d) + succprob(d) * cis(t)

#### Sampling

rand(rng::AbstractRNG, d::Bernoulli) = rand(rng) <= succprob(d)
rand(rng::AbstractRNG, d::Bernoulli) = rand(rng) < succprob(d)

#### MLE fitting

Expand Down

0 comments on commit f935edc

Please sign in to comment.