Skip to content

Commit

Permalink
Fix off-by-one error in `prop_selectRandomSetMember_coversRangeUnifor…
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanknowles committed Jan 11, 2021
1 parent fa7983a commit 370ae27
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -480,7 +480,7 @@ prop_selectRandomSetMember_coversRangeUniformly i j =
assert $ selected `Set.member` set
where
confidence = stdConfidence {tolerance = 0.99}
elementCount = greatest - smallest
elementCount = greatest - smallest + 1
greatest = max i j
inLowerHalf r = fromIntegral r % 1 <= midpoint
inUpperHalf r = fromIntegral r % 1 >= midpoint
Expand Down

0 comments on commit 370ae27

Please sign in to comment.