if (val.isZero()) throw new ArithmeticException("divisor is zero");
boolean xNegative, yNegative; if (x < 0) { xNegative = true; if (x == Long.MIN_VALUE) { divide(valueOf(x), valueOf(y), quotient, remainder, rounding_mode); return; } x = -x; } else xNegative = false;
  public BigInteger divide(BigInteger val)  {    if (val.isZero())      throw new ArithmeticException("divisor is zero");    BigInteger quot = new BigInteger();    divide(this, val, quot, null, TRUNCATE);    return quot.canonicalize();  }