Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Data/BloomFilter/Easy.hs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ safeSuggestSizing capacity errRate
minimum [((-k) * cap / log (1 - (errRate ** (1 / k))), k)
| k <- [1..100]]
roundedBits = nextPowerOfTwo (ceiling bits)
in if roundedBits <= 0 || roundedBits > 0xffffffff
in if roundedBits <= 0 || roundedBits > 0x7fffffff
then Left "capacity too large to represent"
else Right (roundedBits, truncate hashes)

Expand Down