Skip to content

Commit

Permalink
threshold
Browse files Browse the repository at this point in the history
  • Loading branch information
stefan-aws committed Nov 7, 2023
1 parent 5baa5d3 commit 1609f60
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tests/Tests.dfy
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ module Tests {
{
var empiricalMean := empiricalSum / n as real;
var diff := Abs(empiricalMean - trueMean);
var threshold := 10.0 * 10.0 * trueVariance / n as real;
var threshold := 4.0 * 4.0 * trueVariance / n as real;
if diff * diff >= threshold {
print "Test failed: ", description, "\n";
print "Difference between empirical and true mean: ", diff, "\n";
Expand Down Expand Up @@ -89,7 +89,10 @@ module Tests {
}
}
var items := m.Items;
while items != {} {
while items != {}
decreases |items|
{
assert items != {};
var item :| item in items;
items := items - {item};
if item.0 < Helper.Power(2, k) {
Expand Down

0 comments on commit 1609f60

Please sign in to comment.