/** * Returns a {@code BigInteger} whose value is {@code this / divisor}. * * @param divisor value by which {@code this} is divided. * @return {@code this / divisor}. * @throws NullPointerException if {@code divisor == null}. * @throws ArithmeticException if {@code divisor == 0}. */ public BigInteger divide(BigInteger divisor) { BigInt quotient = new BigInt(); BigInt.division(getBigInt(), divisor.getBigInt(), quotient, null); return new BigInteger(quotient); }
/** * Returns a {@code BigInteger} whose value is {@code this % divisor}. * Regarding signs this methods has the same behavior as the % operator on * ints: the sign of the remainder is the same as the sign of this. * * @param divisor value by which {@code this} is divided. * @throws NullPointerException if {@code divisor == null}. * @throws ArithmeticException if {@code divisor == 0}. */ public BigInteger remainder(BigInteger divisor) { BigInt remainder = new BigInt(); BigInt.division(getBigInt(), divisor.getBigInt(), null, remainder); return new BigInteger(remainder); }
/** * Returns a two element {@code BigInteger} array containing * {@code this / divisor} at index 0 and {@code this % divisor} at index 1. * * @param divisor value by which {@code this} is divided. * @throws NullPointerException if {@code divisor == null}. * @throws ArithmeticException if {@code divisor == 0}. * @see #divide * @see #remainder */ public BigInteger[] divideAndRemainder(BigInteger divisor) { BigInt divisorBigInt = divisor.getBigInt(); BigInt quotient = new BigInt(); BigInt remainder = new BigInt(); BigInt.division(getBigInt(), divisorBigInt, quotient, remainder); return new BigInteger[] {new BigInteger(quotient), new BigInteger(remainder) }; }
/** * Returns a {@code BigInteger} whose value is {@code this / divisor}. * * @param divisor value by which {@code this} is divided. * @return {@code this / divisor}. * @throws NullPointerException if {@code divisor == null}. * @throws ArithmeticException if {@code divisor == 0}. */ public BigInteger divide(BigInteger divisor) { BigInt quotient = new BigInt(); BigInt.division(getBigInt(), divisor.getBigInt(), quotient, null); return new BigInteger(quotient); }
/** * Returns a {@code BigInteger} whose value is {@code this / divisor}. * * @param divisor value by which {@code this} is divided. * @return {@code this / divisor}. * @throws NullPointerException if {@code divisor == null}. * @throws ArithmeticException if {@code divisor == 0}. */ public BigInteger divide(BigInteger divisor) { BigInt quotient = new BigInt(); BigInt.division(getBigInt(), divisor.getBigInt(), quotient, null); return new BigInteger(quotient); }
/** * Returns a {@code BigInteger} whose value is {@code this / divisor}. * * @param divisor value by which {@code this} is divided. * @return {@code this / divisor}. * @throws NullPointerException if {@code divisor == null}. * @throws ArithmeticException if {@code divisor == 0}. */ public BigInteger divide(BigInteger divisor) { BigInt quotient = new BigInt(); BigInt.division(getBigInt(), divisor.getBigInt(), quotient, null); return new BigInteger(quotient); }
/** * Returns a {@code BigInteger} whose value is {@code this / divisor}. * * @param divisor value by which {@code this} is divided. * @return {@code this / divisor}. * @throws NullPointerException if {@code divisor == null}. * @throws ArithmeticException if {@code divisor == 0}. */ public BigInteger divide(BigInteger divisor) { BigInt quotient = new BigInt(); BigInt.division(getBigInt(), divisor.getBigInt(), quotient, null); return new BigInteger(quotient); }
/** * Returns a {@code BigInteger} whose value is {@code this % divisor}. * Regarding signs this methods has the same behavior as the % operator on * ints: the sign of the remainder is the same as the sign of this. * * @param divisor value by which {@code this} is divided. * @throws NullPointerException if {@code divisor == null}. * @throws ArithmeticException if {@code divisor == 0}. */ public BigInteger remainder(BigInteger divisor) { BigInt remainder = new BigInt(); BigInt.division(getBigInt(), divisor.getBigInt(), null, remainder); return new BigInteger(remainder); }
/** * Returns a {@code BigInteger} whose value is {@code this % divisor}. * Regarding signs this methods has the same behavior as the % operator on * ints: the sign of the remainder is the same as the sign of this. * * @param divisor value by which {@code this} is divided. * @throws NullPointerException if {@code divisor == null}. * @throws ArithmeticException if {@code divisor == 0}. */ public BigInteger remainder(BigInteger divisor) { BigInt remainder = new BigInt(); BigInt.division(getBigInt(), divisor.getBigInt(), null, remainder); return new BigInteger(remainder); }
/** * Returns a {@code BigInteger} whose value is {@code this / divisor}. * * @param divisor value by which {@code this} is divided. * @return {@code this / divisor}. * @throws NullPointerException if {@code divisor == null}. * @throws ArithmeticException if {@code divisor == 0}. */ public BigInteger divide(BigInteger divisor) { BigInt quotient = new BigInt(); BigInt.division(getBigInt(), divisor.getBigInt(), quotient, null); return new BigInteger(quotient); }
/** * Returns a {@code BigInteger} whose value is {@code this % divisor}. * Regarding signs this methods has the same behavior as the % operator on * ints: the sign of the remainder is the same as the sign of this. * * @param divisor value by which {@code this} is divided. * @throws NullPointerException if {@code divisor == null}. * @throws ArithmeticException if {@code divisor == 0}. */ public BigInteger remainder(BigInteger divisor) { BigInt remainder = new BigInt(); BigInt.division(getBigInt(), divisor.getBigInt(), null, remainder); return new BigInteger(remainder); }
/** * Returns a {@code BigInteger} whose value is {@code this % divisor}. * Regarding signs this methods has the same behavior as the % operator on * ints: the sign of the remainder is the same as the sign of this. * * @param divisor value by which {@code this} is divided. * @throws NullPointerException if {@code divisor == null}. * @throws ArithmeticException if {@code divisor == 0}. */ public BigInteger remainder(BigInteger divisor) { BigInt remainder = new BigInt(); BigInt.division(getBigInt(), divisor.getBigInt(), null, remainder); return new BigInteger(remainder); }
/** * Returns a {@code BigInteger} whose value is {@code this % divisor}. * Regarding signs this methods has the same behavior as the % operator on * ints: the sign of the remainder is the same as the sign of this. * * @param divisor value by which {@code this} is divided. * @throws NullPointerException if {@code divisor == null}. * @throws ArithmeticException if {@code divisor == 0}. */ public BigInteger remainder(BigInteger divisor) { BigInt remainder = new BigInt(); BigInt.division(getBigInt(), divisor.getBigInt(), null, remainder); return new BigInteger(remainder); }
/** * Returns a {@code BigInteger} whose value is {@code this / divisor}. * * @param divisor value by which {@code this} is divided. * @return {@code this / divisor}. * @throws NullPointerException if {@code divisor == null}. * @throws ArithmeticException if {@code divisor == 0}. */ public BigInteger divide(BigInteger divisor) { BigInt quotient = new BigInt(); BigInt.division(getBigInt(), divisor.getBigInt(), quotient, null); return new BigInteger(quotient); }
/** * Returns a {@code BigInteger} whose value is {@code this % divisor}. * Regarding signs this methods has the same behavior as the % operator on * ints: the sign of the remainder is the same as the sign of this. * * @param divisor value by which {@code this} is divided. * @throws NullPointerException if {@code divisor == null}. * @throws ArithmeticException if {@code divisor == 0}. */ public BigInteger remainder(BigInteger divisor) { BigInt remainder = new BigInt(); BigInt.division(getBigInt(), divisor.getBigInt(), null, remainder); return new BigInteger(remainder); }
/** * Returns a two element {@code BigInteger} array containing * {@code this / divisor} at index 0 and {@code this % divisor} at index 1. * * @param divisor value by which {@code this} is divided. * @throws NullPointerException if {@code divisor == null}. * @throws ArithmeticException if {@code divisor == 0}. * @see #divide * @see #remainder */ public BigInteger[] divideAndRemainder(BigInteger divisor) { BigInt divisorBigInt = divisor.getBigInt(); BigInt quotient = new BigInt(); BigInt remainder = new BigInt(); BigInt.division(getBigInt(), divisorBigInt, quotient, remainder); return new BigInteger[] {new BigInteger(quotient), new BigInteger(remainder) }; }
/** * Returns a two element {@code BigInteger} array containing * {@code this / divisor} at index 0 and {@code this % divisor} at index 1. * * @param divisor value by which {@code this} is divided. * @throws NullPointerException if {@code divisor == null}. * @throws ArithmeticException if {@code divisor == 0}. * @see #divide * @see #remainder */ public BigInteger[] divideAndRemainder(BigInteger divisor) { BigInt divisorBigInt = divisor.getBigInt(); BigInt quotient = new BigInt(); BigInt remainder = new BigInt(); BigInt.division(getBigInt(), divisorBigInt, quotient, remainder); return new BigInteger[] {new BigInteger(quotient), new BigInteger(remainder) }; }
/** * Returns a two element {@code BigInteger} array containing * {@code this / divisor} at index 0 and {@code this % divisor} at index 1. * * @param divisor value by which {@code this} is divided. * @throws NullPointerException if {@code divisor == null}. * @throws ArithmeticException if {@code divisor == 0}. * @see #divide * @see #remainder */ public BigInteger[] divideAndRemainder(BigInteger divisor) { BigInt divisorBigInt = divisor.getBigInt(); BigInt quotient = new BigInt(); BigInt remainder = new BigInt(); BigInt.division(getBigInt(), divisorBigInt, quotient, remainder); return new BigInteger[] {new BigInteger(quotient), new BigInteger(remainder) }; }
/** * Returns a two element {@code BigInteger} array containing * {@code this / divisor} at index 0 and {@code this % divisor} at index 1. * * @param divisor value by which {@code this} is divided. * @throws NullPointerException if {@code divisor == null}. * @throws ArithmeticException if {@code divisor == 0}. * @see #divide * @see #remainder */ public BigInteger[] divideAndRemainder(BigInteger divisor) { BigInt divisorBigInt = divisor.getBigInt(); BigInt quotient = new BigInt(); BigInt remainder = new BigInt(); BigInt.division(getBigInt(), divisorBigInt, quotient, remainder); return new BigInteger[] {new BigInteger(quotient), new BigInteger(remainder) }; }
/** * Returns a two element {@code BigInteger} array containing * {@code this / divisor} at index 0 and {@code this % divisor} at index 1. * * @param divisor value by which {@code this} is divided. * @throws NullPointerException if {@code divisor == null}. * @throws ArithmeticException if {@code divisor == 0}. * @see #divide * @see #remainder */ public BigInteger[] divideAndRemainder(BigInteger divisor) { BigInt divisorBigInt = divisor.getBigInt(); BigInt quotient = new BigInt(); BigInt remainder = new BigInt(); BigInt.division(getBigInt(), divisorBigInt, quotient, remainder); return new BigInteger[] {new BigInteger(quotient), new BigInteger(remainder) }; }