code: public static boolean isMathematicalInteger(double x) {
          return isFinite(x) && (x == 0.0 || SIGNIFICAND_BITS - Long.numberOfTrailingZeros(getSignificand(x)) <= getExponent(x));
      }
docs: Returns {@code true} if {@code x} represents a mathematical integer.
  
  <p>This is equivalent to, but not necessarily implemented as, the expression {@code
  !Double.isNaN(x) && !Double.isInfinite(x) && x == Math.rint(x)}.