code: protected Number narrowBigInteger(Object lhs, Object rhs, BigInteger bigi) {
      // coerce to long if possible
      if (!(lhs instanceof BigInteger || rhs instanceof BigInteger) && bigi.compareTo(BIGI_LONG_MAX_VALUE) <= 0 && bigi.compareTo(BIGI_LONG_MIN_VALUE) >= 0) {
        // coerce to int if possible
        long l = bigi.longValue();
        // coerce to int when possible (int being so often used in method parms)
        if (!(lhs instanceof Long || rhs instanceof Long) && l <= Integer.MAX_VALUE && l >= Integer.MIN_VALUE) {
          return Integer.valueOf((int) l);
        }
        return Long.valueOf(l);
      }
      return bigi;
    }
docs: Given a BigInteger, narrow it to an Integer or Long if it fits and the
  arguments class allow it.
  <p>
  The rules are: if either arguments is a BigInteger, no narrowing will occur
  if either arguments is a Long, no narrowing to Integer will occur
  </p>
  
  @param lhs
  the left hand side operand that lead to the bigi result
  @param rhs
  the right hand side operand that lead to the bigi result
  @param bigi
  the BigInteger to narrow
  @return an Integer or Long if narrowing is possible, the original
  BigInteger otherwise