/** * Returns the smallest integer x > {@code this} which is probably prime as * a {@code BigInteger} instance. The probability that the returned {@code * BigInteger} is prime is greater than {@code 1 - 1/2<sup>100</sup>}. * * @return smallest integer > {@code this} which is probably prime. * @throws ArithmeticException if {@code this < 0}. */ public BigInteger nextProbablePrime() { if (sign < 0) { throw new ArithmeticException("sign < 0"); } return Primality.nextProbablePrime(this); }
/** * Returns the smallest integer x > {@code this} which is probably prime as * a {@code BigInteger} instance. The probability that the returned {@code * BigInteger} is prime is greater than {@code 1 - 1/2<sup>100</sup>}. * * @return smallest integer > {@code this} which is probably prime. * @throws ArithmeticException if {@code this < 0}. */ public BigInteger nextProbablePrime() { if (sign < 0) { throw new ArithmeticException("sign < 0"); } return Primality.nextProbablePrime(this); }
/** * Returns the smallest integer x > {@code this} which is probably prime as * a {@code BigInteger} instance. The probability that the returned {@code * BigInteger} is prime is greater than {@code 1 - 1/2<sup>100</sup>}. * * @return smallest integer > {@code this} which is probably prime. * @throws ArithmeticException if {@code this < 0}. */ public BigInteger nextProbablePrime() { if (sign < 0) { throw new ArithmeticException("sign < 0"); } return Primality.nextProbablePrime(this); }
/** * Returns the smallest integer x > {@code this} which is probably prime as * a {@code BigInteger} instance. The probability that the returned {@code * BigInteger} is prime is greater than {@code 1 - 1/2<sup>100</sup>}. * * @return smallest integer > {@code this} which is probably prime. * @throws ArithmeticException if {@code this < 0}. */ public BigInteger nextProbablePrime() { if (sign < 0) { throw new ArithmeticException("sign < 0"); } return Primality.nextProbablePrime(this); }
/** * Returns the smallest integer x > {@code this} which is probably prime as * a {@code BigInteger} instance. The probability that the returned {@code * BigInteger} is prime is greater than {@code 1 - 1/2<sup>100</sup>}. * * @return smallest integer > {@code this} which is probably prime. * @throws ArithmeticException if {@code this < 0}. */ public BigInteger nextProbablePrime() { if (sign < 0) { throw new ArithmeticException("sign < 0"); } return Primality.nextProbablePrime(this); }
/** * Returns the smallest integer x > {@code this} which is probably prime as * a {@code BigInteger} instance. The probability that the returned {@code * BigInteger} is prime is greater than {@code 1 - 1/2<sup>100</sup>}. * * @return smallest integer > {@code this} which is probably prime. * @throws ArithmeticException if {@code this < 0}. */ public BigInteger nextProbablePrime() { if (sign < 0) { throw new ArithmeticException("sign < 0"); } return Primality.nextProbablePrime(this); }
/** * Returns the smallest integer x > {@code this} which is probably prime as * a {@code BigInteger} instance. The probability that the returned {@code * BigInteger} is prime is greater than {@code 1 - 1/2<sup>100</sup>}. * * @return smallest integer > {@code this} which is probably prime. * @throws ArithmeticException if {@code this < 0}. */ public BigInteger nextProbablePrime() { if (sign < 0) { throw new ArithmeticException("sign < 0"); } return Primality.nextProbablePrime(this); }