docs: private static BigInteger d2b(double d, int[] e, int[] bits)
      {
          byte dbl_bits[];
          int i, k, y, z, de;
          long dBits = Double.doubleToLongBits(d);
          int d0 = (int)(dBits >>> 32);
          int d1 = (int)(dBits);
  
          z = d0 & Frac_mask;
          d0 &= 0x7fffffff;   /* clear sign bit, which we ignore */
  
          if ((de = (d0 >>> Exp_shift)) != 0)
              z |= Exp_msk1;
  
          if ((y = d1) != 0) {
              dbl_bits = new byte[8];
              k = lo0bits(y);
              y >>>= k;
              if (k != 0) {
                  stuffBits(dbl_bits, 4, y | z << (32 - k));
                  z >>= k;
              }
              else
                  stuffBits(dbl_bits, 4, y);
              stuffBits(dbl_bits, 0, z);
              i = (z != 0) ? 2 : 1;
          }
          else {
      //        JS_ASSERT(z);
              dbl_bits = new byte[4];
              k = lo0bits(z);
              z >>>= k;
              stuffBits(dbl_bits, 0, z);
              k += 32;
              i = 1;
          }
          if (de != 0) {
              e[0] = de - Bias - (P-1) + k;
              bits[0] = P - k;
          }
          else {
              e[0] = de - Bias - (P-1) + 1 + k;
              bits[0] = 32*i - hi0bits(z);
          }
          return new BigInteger(dbl_bits);
      }