/** * Multiplies a number by a positive integer. * @param val an arbitrary {@code BigInteger} * @param factor a positive {@code int} number * @return {@code val * factor} */ static BigInteger multiplyByPositiveInt(BigInteger val, int factor) { BigInt bi = val.getBigInt().copy(); bi.multiplyByPositiveInt(factor); return new BigInteger(bi); }
/** * Returns a {@code BigInteger} whose value is the absolute value of {@code * this}. */ public BigInteger abs() { BigInt bigInt = getBigInt(); if (bigInt.sign() >= 0) { return this; } BigInt a = bigInt.copy(); a.setSign(1); return new BigInteger(a); }
/** * Returns a {@code BigInteger} whose value is the {@code -this}. */ public BigInteger negate() { BigInt bigInt = getBigInt(); int sign = bigInt.sign(); if (sign == 0) { return this; } BigInt a = bigInt.copy(); a.setSign(-sign); return new BigInteger(a); }
BigInt startPoint = ni.copy(); BigInt probPrime = new BigInt();
/** * Multiplies a number by a positive integer. * @param val an arbitrary {@code BigInteger} * @param factor a positive {@code int} number * @return {@code val * factor} */ static BigInteger multiplyByPositiveInt(BigInteger val, int factor) { BigInt bi = val.getBigInt().copy(); bi.multiplyByPositiveInt(factor); return new BigInteger(bi); }
/** * Multiplies a number by a positive integer. * @param val an arbitrary {@code BigInteger} * @param factor a positive {@code int} number * @return {@code val * factor} */ static BigInteger multiplyByPositiveInt(BigInteger val, int factor) { BigInt bi = val.getBigInt().copy(); bi.multiplyByPositiveInt(factor); return new BigInteger(bi); }
/** * Multiplies a number by a positive integer. * @param val an arbitrary {@code BigInteger} * @param factor a positive {@code int} number * @return {@code val * factor} */ static BigInteger multiplyByPositiveInt(BigInteger val, int factor) { BigInt bi = val.getBigInt().copy(); bi.multiplyByPositiveInt(factor); return new BigInteger(bi); }
/** * Multiplies a number by a positive integer. * @param val an arbitrary {@code BigInteger} * @param factor a positive {@code int} number * @return {@code val * factor} */ static BigInteger multiplyByPositiveInt(BigInteger val, int factor) { BigInt bi = val.getBigInt().copy(); bi.multiplyByPositiveInt(factor); return new BigInteger(bi); }
/** * Multiplies a number by a positive integer. * @param val an arbitrary {@code BigInteger} * @param factor a positive {@code int} number * @return {@code val * factor} */ static BigInteger multiplyByPositiveInt(BigInteger val, int factor) { BigInt bi = val.getBigInt().copy(); bi.multiplyByPositiveInt(factor); return new BigInteger(bi); }
/** * Multiplies a number by a positive integer. * @param val an arbitrary {@code BigInteger} * @param factor a positive {@code int} number * @return {@code val * factor} */ static BigInteger multiplyByPositiveInt(BigInteger val, int factor) { BigInt bi = val.getBigInt().copy(); bi.multiplyByPositiveInt(factor); return new BigInteger(bi); }
/** * Returns a {@code BigInteger} whose value is the absolute value of {@code * this}. */ public BigInteger abs() { BigInt bigInt = getBigInt(); if (bigInt.sign() >= 0) { return this; } BigInt a = bigInt.copy(); a.setSign(1); return new BigInteger(a); }
/** * Returns a {@code BigInteger} whose value is the {@code -this}. */ public BigInteger negate() { BigInt bigInt = getBigInt(); int sign = bigInt.sign(); if (sign == 0) { return this; } BigInt a = bigInt.copy(); a.setSign(-sign); return new BigInteger(a); }
/** * Returns a {@code BigInteger} whose value is the {@code -this}. */ public BigInteger negate() { BigInt bigInt = getBigInt(); int sign = bigInt.sign(); if (sign == 0) { return this; } BigInt a = bigInt.copy(); a.setSign(-sign); return new BigInteger(a); }
/** * Returns a {@code BigInteger} whose value is the {@code -this}. */ public BigInteger negate() { BigInt bigInt = getBigInt(); int sign = bigInt.sign(); if (sign == 0) { return this; } BigInt a = bigInt.copy(); a.setSign(-sign); return new BigInteger(a); }
/** * Returns a {@code BigInteger} whose value is the absolute value of {@code * this}. */ public BigInteger abs() { BigInt bigInt = getBigInt(); if (bigInt.sign() >= 0) { return this; } BigInt a = bigInt.copy(); a.setSign(1); return new BigInteger(a); }
/** * Returns a {@code BigInteger} whose value is the absolute value of {@code * this}. */ public BigInteger abs() { BigInt bigInt = getBigInt(); if (bigInt.sign() >= 0) { return this; } BigInt a = bigInt.copy(); a.setSign(1); return new BigInteger(a); }
/** * Returns a {@code BigInteger} whose value is the {@code -this}. */ public BigInteger negate() { BigInt bigInt = getBigInt(); int sign = bigInt.sign(); if (sign == 0) { return this; } BigInt a = bigInt.copy(); a.setSign(-sign); return new BigInteger(a); }
/** * Returns a {@code BigInteger} whose value is the absolute value of {@code * this}. */ public BigInteger abs() { BigInt bigInt = getBigInt(); if (bigInt.sign() >= 0) { return this; } BigInt a = bigInt.copy(); a.setSign(1); return new BigInteger(a); }
/** * Returns a {@code BigInteger} whose value is the absolute value of {@code * this}. */ public BigInteger abs() { BigInt bigInt = getBigInt(); if (bigInt.sign() >= 0) { return this; } BigInt a = bigInt.copy(); a.setSign(1); return new BigInteger(a); }
/** * Returns a {@code BigInteger} whose value is the {@code -this}. */ public BigInteger negate() { BigInt bigInt = getBigInt(); int sign = bigInt.sign(); if (sign == 0) { return this; } BigInt a = bigInt.copy(); a.setSign(-sign); return new BigInteger(a); }