docs: public static <E> double entropy(Counter<E> c) {
      double entropy = 0.0;
      double total = c.totalCount();
      for (E key : c.keySet()) {
        double count = c.getCount(key);
        if (count == 0) {
          continue; // 0.0 doesn't add entropy but may cause -Inf
        }
        count /= total; // use normalized count
        entropy -= count * (Math.log(count) / LOG_E_2);
      }
      return entropy;
    }