docs: public static double lpow10(long m, int n) {
      if(m == 0) {
        return 0.0;
      }
      if(m == Long.MIN_VALUE) {
        return lpow10(Long.MIN_VALUE / 10, n + 1);
      }
      if(m < 0) {
        return -lpow10(-m, n);
      }
      if(n >= 0) { // Positive power.
        if(n > 308) {
          return Double.POSITIVE_INFINITY;
        }
        // Works with 4 x 32 bits registers (x3:x2:x1:x0)
        long x0 = 0; // 32 bits.
        long x1 = 0; // 32 bits.
        long x2 = m & LONG_32_BITS; // 32 bits.
        long x3 = m >>> 32; // 32 bits.
        int pow2 = 0;
        while(n != 0) {
          int i = (n >= POW5_INT.length) ? POW5_INT.length - 1 : n;
          int coef = POW5_INT[i]; // 31 bits max.
  
          if(((int) x0) != 0) {
            x0 *= coef; // 63 bits max.
          }
          if(((int) x1) != 0) {
            x1 *= coef; // 63 bits max.
          }
          x2 *= coef; // 63 bits max.
          x3 *= coef; // 63 bits max.
  
          x1 += x0 >>> 32;
          x0 &= LONG_32_BITS;
  
          x2 += x1 >>> 32;
          x1 &= LONG_32_BITS;
  
          x3 += x2 >>> 32;
          x2 &= LONG_32_BITS;
  
          // Adjusts powers.
          pow2 += i;
          n -= i;
  
          // Normalizes (x3 should be 32 bits max).
          long carry = x3 >>> 32;
          if(carry != 0) { // Shift.
            x0 = x1;
            x1 = x2;
            x2 = x3 & LONG_32_BITS;
            x3 = carry;
            pow2 += 32;
          }
        }
  
        // Merges registers to a 63 bits mantissa.
        assert (x3 >= 0);
        int shift = 31 - magnitude(x3); // -1..30
        pow2 -= shift;
        long mantissa = (shift < 0) ? (x3 << 31) | (x2 >>> 1) : // x3 is 32 bits.
            (((x3 << 32) | x2) << shift) | (x1 >>> (32 - shift));
        return lpow2(mantissa, pow2);
      }
      else { // n < 0
        if(n < -324 - 20) {
          return 0.;
        }
  
        // Works with x1:x0 126 bits register.
        long x1 = m; // 63 bits.
        long x0 = 0; // 63 bits.
        int pow2 = 0;
        while(true) {
          // Normalizes x1:x0
          assert (x1 >= 0);
          int shift = 63 - magnitude(x1);
          x1 <<= shift;
          x1 |= x0 >>> (63 - shift);
          x0 = (x0 << shift) & LONG_63_BITS;
          pow2 -= shift;
  
          // Checks if division has to be performed.
          if(n == 0) {
            break; // Done.
          }
  
          // Retrieves power of 5 divisor.
          int i = (-n >= POW5_INT.length) ? POW5_INT.length - 1 : -n;
          int divisor = POW5_INT[i];
  
          // Performs the division (126 bits by 31 bits).
          long wh = (x1 >>> 32);
          long qh = wh / divisor;
          long r = wh - qh * divisor;
          long wl = (r << 32) | (x1 & LONG_32_BITS);
          long ql = wl / divisor;
          r = wl - ql * divisor;
          x1 = (qh << 32) | ql;
  
          wh = (r << 31) | (x0 >>> 32);
          qh = wh / divisor;
          r = wh - qh * divisor;
          wl = (r << 32) | (x0 & LONG_32_BITS);
          ql = wl / divisor;
          x0 = (qh << 32) | ql;
  
          // Adjusts powers.
          n += i;
          pow2 -= i;
        }
        return lpow2(x1, pow2);
      }
    }