code: protected static int computeOptimalNumberOfHashFunctions(double approximateNumberOfElements, double requiredNumberOfBits) {
  
      double numberOfHashFunctions = (requiredNumberOfBits / approximateNumberOfElements) * Math.log(2.0d);
  
      return Double.valueOf(Math.ceil(numberOfHashFunctions)).intValue();
    }
docs: Computes the optimal number of hash functions to apply to each element added to the Bloom Filter as a factor
  of the approximate (estimated) number of elements that will be added to the filter along with
  the required number of bits needed by the filter, which was computed from the probability of false positives.
  
  k = m/n * log 2
  
  m is the required number of bits needed for the bloom filter
  n is the approximate number of elements to be added to the bloom filter
  k is the optimal number of hash functions to apply to the element added to the bloom filter
  
  @param approximateNumberOfElements integer value indicating the approximate, estimated number of elements
  the user expects will be added to the Bloom Filter.
  @param requiredNumberOfBits the required number of bits needed by the Bloom Filter to satify the probability
  of false positives.
  @return the optimal number of hash functions used by the Bloom Filter.