bloom-filter
bloom-filter copied to clipboard
Bad math in computing nHashFuncs
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????