Multiply by a BigInteger.

@param val a second number.
@return the product of this with the value.
964724
public Rational multiply(final BigInteger val) {
        Rational val2 = new Rational(val, BigInteger.ONE);
        return (multiply(val2));
    }
1159983
public void divide(double val) {
        for (int c = 0; c < this.values.length; c++) {
            divideValue(c, val);
        }
    }
393824
public static int toIntExact(long value) {
        if (value < Integer.MIN_VALUE || value > Integer.MAX_VALUE) {
            throw new ArithmeticException("integer overflow");
        }

        return (int) value;
    }
192699
public static final BigInteger getBigInteger(Number value)
   {
      BigInteger result = null;
      if (value != null)
      {
         if (value instanceof BigInteger)
         {
            result = (BigInteger) value;
         }
         else
         {
            result = BigInteger.valueOf(Math.round(value.doubleValue()));
         }
      }
      return (result);
   }
930018
public JcNumber mult(JcNumber val) {
		JcNumber ret = new JcNumber(val, this, OPERATOR.Number.MULT);
		QueryRecorder.recordInvocationConditional(this, "mult", ret, QueryRecorder.placeHolder(val));
		return ret;
	}
263170
public void sendInteger2(int val) throws IOException {
    if (val < Short.MIN_VALUE || val > Short.MAX_VALUE) {
      throw new IOException("Tried to send an out-of-range integer as a 2-byte value: " + val);
    }

    int2Buf[0] = (byte) (val >>> 8);
    int2Buf[1] = (byte) val;
    pgOutput.write(int2Buf);
  }
1327390
@Nonnull
  @CheckReturnValue
  public CSSSimpleValueWithUnit multiply (@Nonnull final BigDecimal aValue)
  {
    return new CSSSimpleValueWithUnit (m_aValue.multiply (aValue), m_eUnit);
  }
783712
public static BigInteger read(String value) {
		if (!StringUtils.hasText(value)) return null;
		
		return new BigInteger(value);
	}
966834
public void putInt(int val) throws IOException {
    if (byteOrder == ByteOrder.BIG_ENDIAN) {
      writeIntCurrentPosition((val >>> 24) & 0xFF);
      writeIntCurrentPosition((val >>> 16) & 0xFF);
      writeIntCurrentPosition((val >>> 8) & 0xFF);
      writeIntCurrentPosition((val >>> 0) & 0xFF);
    }
    else {
      writeIntCurrentPosition((val >>> 0) & 0xFF);
      writeIntCurrentPosition((val >>> 8) & 0xFF);
      writeIntCurrentPosition((val >>> 16) & 0xFF);
      writeIntCurrentPosition((val >>> 24) & 0xFF);
    }
  }
156344
public static BigDecimal bigDecimalValue(BigDecimal val)
    {
        if (val == null
            || val.getClass() == BigDecimal.class)
        {
            return val;
        }
        return new BigDecimal(val.unscaledValue(), val.scale());
    }
526680
public JcNumber plus(Number val) {
		JcNumber ret = new JcNumber(val, this, OPERATOR.Number.PLUS);
		QueryRecorder.recordInvocationConditional(this, "plus", ret, QueryRecorder.literal(val));
		return ret;
	}
978825
public double toDouble(Object val) {
    if (val == null) {
      return 0;
    }
    else if (val instanceof Double) {
      return ((Double) val).doubleValue();
    }
    else if (val instanceof Number) {
      // The below construct is used rather than ((Number)val).doubleValue() to ensure
      // equality between comparing new Double( 6.4 / 3 ) and the stencil expression of 6.4 / 3
      return Double.parseDouble(String.valueOf(val));
    }
    else if (val instanceof Boolean) {
      return ((Boolean) val).booleanValue() ? 1. : 0.;
    }
    else if (val instanceof String) {
      String string = ((String) val).trim();
      if ("".equals(string)) {
        return Double.NaN;
      }
      else {
        // the spec seems to be iffy about this. Going to give it a wack anyway
        return Double.parseDouble(string);
      }
    }
    else if (val instanceof Character) {
      int i = ((Character) val).charValue();
      return i;
    }

    throw new ArithmeticException("Double coercion: " + val.getClass().getName() + ":(" + val + ")");
  }
757827
public static BigInteger unsignedLongToBigInteger(int signum, long val)
    {
        byte[] magnitude = {
            (byte) ((val >> 56) & 0xFF),
            (byte) ((val >> 48) & 0xFF),
            (byte) ((val >> 40) & 0xFF),
            (byte) ((val >> 32) & 0xFF),
            (byte) ((val >> 24) & 0xFF),
            (byte) ((val >> 16) & 0xFF),
            (byte) ((val >>  8) & 0xFF),
            (byte) (val & 0xFF),
        };
        return new BigInteger(signum, magnitude);
    }
1062863
public static int multiplyExact(int x, int y) {
        long r = (long)x * (long)y;
        if ((int)r != r) {
            throw new ArithmeticException("integer overflow");
        }
        return (int)r;
    }
691727
public BigDecimal toBigDecimal(Object val) {
    if (val instanceof BigDecimal) {
      return roundBigDecimal((BigDecimal) val);
    }
    else if (val == null) {
      return BigDecimal.ZERO;
    }
    else if (val instanceof String) {
      String string = ((String) val).trim();
      if ("".equals(string)) {
        return BigDecimal.ZERO;
      }
      return roundBigDecimal(new BigDecimal(string, getMathContext()));
    }
    else if (val instanceof Double) {
      if (!Double.isNaN(((Double) val).doubleValue())) {
        return roundBigDecimal(new BigDecimal(val.toString(), getMathContext()));
      }
      else {
        return BigDecimal.ZERO;
      }
    }
    else if (val instanceof Number) {
      return roundBigDecimal(new BigDecimal(val.toString(), getMathContext()));
    }
    else if (val instanceof Character) {
      int i = ((Character) val).charValue();
      return new BigDecimal(i);
    }

    throw new ArithmeticException("BigDecimal coercion: " + val.getClass().getName() + ":(" + val + ")");
  }
145743
public boolean greaterThan(long val) {
        if (isInfinity && posOrNeg) {
            return true;
        } else if (isInfinity && !posOrNeg) {
            return false;
        } else {
            return this.val > val;
        }
    }
837820
public Object negate(Object val) {
    if (val instanceof Integer) {
      int valueAsInt = ((Integer) val).intValue();
      return Integer.valueOf(-valueAsInt);
    }
    else if (val instanceof Double) {
      double valueAsDouble = ((Double) val).doubleValue();
      return new Double(-valueAsDouble);
    }
    else if (val instanceof Long) {
      long valueAsLong = -((Long) val).longValue();
      return Long.valueOf(valueAsLong);
    }
    else if (val instanceof BigDecimal) {
      BigDecimal valueAsBigD = (BigDecimal) val;
      return valueAsBigD.negate();
    }
    else if (val instanceof BigInteger) {
      BigInteger valueAsBigI = (BigInteger) val;
      return valueAsBigI.negate();
    }
    else if (val instanceof Float) {
      float valueAsFloat = ((Float) val).floatValue();
      return new Float(-valueAsFloat);
    }
    else if (val instanceof Short) {
      short valueAsShort = ((Short) val).shortValue();
      return Short.valueOf((short) -valueAsShort);
    }
    else if (val instanceof Byte) {
      byte valueAsByte = ((Byte) val).byteValue();
      return Byte.valueOf((byte) -valueAsByte);
    }
    else if (val instanceof Boolean) {
      return ((Boolean) val).booleanValue() ? Boolean.FALSE : Boolean.TRUE;
    }
    throw new ArithmeticException("Object negation:(" + val + ")");
  }