bits-and-blooms/bloom

Incorrect return value for EstimateFalsePositiveRate

erikdubbelboer opened this issue · 1 comments

At line 77 EstimateFalsePositiveRate returns the number of false positives found divided by 100. This makes no sense as the number of tests performed depends on the input number. Choosing a higher n will now increase the number of false positives by a too high amount.

The correct return value would be the number of false positives found depending on the number of tests performed:

fp_rate = float64(fp) / float64(rounds) * float64(100)

Fixed in d9cd4ac