Closed GoogleCodeExporter closed 9 years ago
Hey Dimitri,
Mind taking a look at this since you originally wrote that code?
Thanks,
-kak
Original comment by kak@google.com
on 13 Jun 2014 at 8:30
Sure. This looks valid; the current code is not a faithful rendering of the
intended formula. An extra pair of parens around "n * Math.log(2)" should do.
This can be fixed, since the number of hash functions is part of the serial
form, so a different function for the create() method can't affect existing BFs.
The impact of this should be fairly low - at worst, the BF is using one less
hash function than it would (5 instead of 6), and this doesn't affect the
default fpp either.
Original comment by andr...@google.com
on 16 Jun 2014 at 10:00
@andreou: I don't think the extra pair of parens will solve it. Right now we're
doing:
m / n * Math.log(2) // this is really (m / n) * Math.log(2)
Your proposal changes the formula:
m / (n * Math.log(2))
Original comment by kak@google.com
on 16 Jun 2014 at 3:05
Oops, yeah. That was too fast. :)
Original comment by andr...@google.com
on 16 Jun 2014 at 3:07
This issue has been migrated to GitHub.
It can be found at https://github.com/google/guava/issues/<issue id>
Original comment by cgdecker@google.com
on 1 Nov 2014 at 4:08
Original comment by cgdecker@google.com
on 1 Nov 2014 at 4:17
Original comment by cgdecker@google.com
on 3 Nov 2014 at 9:07
Original issue reported on code.google.com by
justathe...@gmail.com
on 13 Jun 2014 at 8:25