Skip to content

Commit

Permalink
Improved loop for parameters of Bernoulli expneg greater than 1 (#157)
Browse files Browse the repository at this point in the history
By submitting this pull request, I confirm that my contribution is made
under the terms of the [MIT
license](https://github.com/dafny-lang/dafny/blob/master/LICENSE.txt).
  • Loading branch information
jtristan authored Feb 29, 2024
1 parent 88f1dab commit 6bcf55d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/DafnyVMCTrait.dfy
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,12 @@ module DafnyVMCTrait {
o := true;
} else {
var B := BernoulliExpNegSampleUnit(1, 1);
var R := BernoulliExpNegSampleGenLoop(iter - 1);
o := B == true && R == true;
if ! (B == true) {
o := B;
} else {
var R := BernoulliExpNegSampleGenLoop(iter - 1);
o := R;
}
}
}

Expand Down

0 comments on commit 6bcf55d

Please sign in to comment.