Code example for BigInteger

Methods: multiply

0
	@Override 
	public java.lang.Number evaluate(ProofContext proofContext, Map<VariableTerm, Term> variables) {
		java.lang.Number n1 = PrologUtils.evaluate(proofContext, getTerm(0), variables);
		java.lang.Number n2 = PrologUtils.evaluate(proofContext, getTerm(1), variables);
		if (n1 instanceof BigInteger && n2 instanceof BigInteger) {
			return ((BigInteger) n1).multiply((BigInteger) n2);
		} 
		return PrologUtils.toBigDecimal(n1).multiply(PrologUtils.toBigDecimal(n2));
	} 
}