anchor.diff:        r._subTo(t, r);
       }
       ONE._dlShiftTo(y_used, t);
  -    t._subTo(y, y);  // "negative" y so we can replace sub with _am later
  +    t._subTo(y, y);  // Negate y so we can replace sub with _am later.
       while (y._used < y_used) {
         y._digits[y._used++] = 0;
       }
       while (--j >= 0) {
  -      // Estimate quotient digit
  -      var qd = (r._digits[--i] == y0)
  -          ? DIGIT_MASK
  -          : (r._digits[i]*d1 + (r._digits[i - 1] + e)*d2).floor();
  -      if ((r._digits[i] += y._amc(0, qd, r, j, 0, y_used)) < qd) {  // Try it out
  +      // Estimate quotient digit.
  +      var qd;
  +      if (r._digits[--i] == y0) {
  +        qd = DIGIT_MASK;
  +      } else {
  +        // Chop off one bit, since a Mint cannot hold 2 DIGITs.
  +        qd = ((r._digits[i] << (DIGIT_BITS - 1)) |
  +              (r._digits[i - 1] >> 1)) ~/ yt;
  +        if (qd > DIGIT_MASK) {
  +          qd = DIGIT_MASK;
  +        }
  +      }
  +      if ((r._digits[i] += y._am(0, qd, r, j, y_used)) < qd) {  // Try it out.
           y._dlShiftTo(j, t);
           r._subTo(t, r);
           while (r._digits[i] < --qd) {
  
positive.code: 
    // Bits per half digit.
    static const int DIGIT2_BITS = DIGIT_BITS >> 1;
    static const int DIGIT2_BASE = 1 << DIGIT2_BITS;
    static const int DIGIT2_MASK = (1 << DIGIT2_BITS) - 1;
  
    // Allocate extra digits so the bigint can be reused.
    static const int EXTRA_DIGITS = 4;
  
    // Floating-point unit integer precision.
    static const int FP_BITS = 52;
    static const int FP_BASE = 1 << FP_BITS;
    static const int FP_D1 = FP_BITS - DIGIT_BITS;
    static const int FP_D2 = 2 * DIGIT_BITS - FP_BITS;
  
    // Min and max of non bigint values.
    static const int MIN_INT64 = (-1) << 63;
  
negative.code:     if (r == null) {
        r = new _Bigint();
      }
      var y = new _Bigint();  // Normalized modulus.
      var nsh = DIGIT_BITS - _nbits(a._digits[a._used - 1]);
      if (nsh > 0) {
        a._lShiftTo(nsh, y);
        _lShiftTo(nsh, r);
  