code: public static int registerBitSize(final long expectedUniqueElements) {
          return Math.max(HLL.MINIMUM_REGWIDTH_PARAM,
                          (int)Math.ceil(NumberUtil.log2(NumberUtil.log2(expectedUniqueElements))));
      }
docs: Computes the bit-width of HLL registers necessary to estimate a set of
  the specified cardinality.
  
  @param  expectedUniqueElements an upper bound on the number of unique
  elements that are expected.  This must be greater than zero.
  @return a register size in bits (i.e. <code>log2(log2(n))</code>)