bloom-bitset 11.2.0

Zero-dependency probabilistic data structures: 512-bit cache-line-blocked Bloom filter, 4-bit saturating Counting Bloom filter, and HyperLogLog cardinality estimator.
Documentation
/// Minimum supported HyperLogLog precision (`16` registers).
pub const HLL_MIN_PRECISION: u8 = 4;
/// Default HyperLogLog precision (`14` -> `16384` registers, ~0.81% std error).
pub const HLL_DEFAULT_PRECISION: u8 = 14;
/// Maximum supported HyperLogLog precision (`65536` registers).
pub const HLL_MAX_PRECISION: u8 = 16;

/// Precomputed `2^(-reg)` lookup table for HyperLogLog harmonic mean accumulation (`0..=64`).
pub(crate) const HLL_POW2_NEG: [f64; 65] = {
    let mut table: [f64; 65] = [0.0; 65];
    let mut i: usize = 0;
    let mut val: f64 = 1.0;
    while i < 65 {
        table[i] = val;
        val *= 0.5;
        i += 1;
    }
    table
};