public static long computeBitSize(long maxKeys, double errorRate) {
    return (long) Math.ceil(maxKeys * (-Math.log(errorRate) / LOG2_SQUARED));
  }
@return the number of bits for a Bloom filter than can hold the given number of keys and
        provide the given error rate, assuming that the optimal number of hash functions is
        used and it does not have to be an integer.
hbase-server/src/main/java/org/apache/hadoop/hbase/util/BloomFilterUtil.java