docs: public static double lpow2(long m, int n) {
      if(m == 0) {
        return 0.0;
      }
      if(m == Long.MIN_VALUE) {
        return lpow2(Long.MIN_VALUE >> 1, n + 1);
      }
      if(m < 0) {
        return -lpow2(-m, n);
      }
      assert (m >= 0);
      int bitLength = magnitude(m);
      int shift = bitLength - 53;
      long exp = 1023L + 52 + n + shift; // Use long to avoid overflow.
      if(exp >= 0x7FF) {
        return Double.POSITIVE_INFINITY;
      }
      if(exp <= 0) { // Degenerated number (subnormal, assume 0 for bit 52)
        if(exp <= -54) {
          return 0.0;
        }
        return lpow2(m, n + 54) / 18014398509481984L; // 2^54 Exact.
      }
      // Normal number.
      long bits = (shift > 0) ? (m >> shift) + ((m >> (shift - 1)) & 1) : // Rounding.
          m << -shift;
      if(((bits >> 52) != 1) && (++exp >= 0x7FF)) {
        return Double.POSITIVE_INFINITY;
      }
      bits &= 0x000fffffffffffffL; // Clears MSB (bit 52)
      bits |= exp << 52;
      return Double.longBitsToDouble(bits);
    }