bloom-filter icon indicating copy to clipboard operation
bloom-filter copied to clipboard

Bad math in computing nHashFuncs

Open GeoffreyPlitt opened this issue 8 years ago • 0 comments

I tried creating a BF with 1B elements and fpr=0.001. I know that's a huge filter, so this library may enforce max sizes. But the nHashFuncs is way too low.

Adding logs, I got: { elements: 1000000000, falsePositiveRate: 0.001, size: 14377587566.051159, filterSize: 1797198445, max: 288000 } nHashFuncs 0 nHashFuncs 1

I understand the size is going to be that 288k figure, but why is nHashFuncs only 1????

GeoffreyPlitt avatar Jul 08 '17 22:07 GeoffreyPlitt