Skip to content

Commit

Permalink
fix: recover optimal_m.
Browse files Browse the repository at this point in the history
  • Loading branch information
yankun1992 committed Feb 17, 2023
1 parent 1b9162e commit 29ff8eb
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion fastbloom-rs/src/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ pub(crate) const MASK: u64 = 0b11111111_11111111_11111111_11111111_11111111_1111
/// number of elements in bloom filter) and `p` (tolerable false positive rate).
#[inline]
fn optimal_m(n: u64, p: f64) -> u64 {
let p = 0.98 * p;
let fact = -(n as f64) * p.ln();
let div = 2f64.ln().powi(2);
let m: f64 = fact / div;
Expand Down

0 comments on commit 29ff8eb

Please sign in to comment.