public MNumber set(MNumber aNumber) { if (aNumber instanceof MNatural) { MNatural number = (MNatural) aNumber; if (number.isPosInfinity()) setPosInfinity(); else if (number.isNegInfinity()) setNegInfinity(); else setNotInfinity(); m_value = new BigInteger(((MNatural) aNumber).m_value.toByteArray()); } else { setDouble(aNumber.getDouble()); } checkValue(); return this; }
public MNumber mult(MNumber aNumber, MNumber aSecondNumber) { MNatural sum = (MNatural) aNumber.copy(); sum.add(aSecondNumber); return sum; }