public BigInteger nextProbablePrime() { if (sign < 0) { throw new ArithmeticException("start < 0: " + this); } return(Primality.nextProbablePrime(this)); }
public BigInteger(int bitLength, int certainty, Random rnd) { if (bitLength < 2) { throw new ArithmeticException("bitLength < 2"); } BigInteger me = Primality.consBigInteger(bitLength, certainty, rnd); sign = me.sign; numberLength = me.numberLength; digits = me.digits; }
public bool isProbablePrime(int certainty) { return(Primality.isProbablePrime(abs(), certainty)); }