code: public double getFalsePositiveProbability(double numberOfElements) {
          // (1 - e^(-k * n / m)) ^ k
          return Math.pow((1 - Math.exp(-k * (double) numberOfElements
                          / (double) bitSetSize)), k);
  
      }
docs: Calculate the probability of a false positive given the specified
  number of inserted elements.
  
  @param numberOfElements number of inserted elements.
  @return probability of a false positive.