Esempio n. 1
0
 public BigInteger nextProbablePrime()
 {
     if (sign < 0)
     {
         throw new ArithmeticException("start < 0: " + this);
     }
     return(Primality.nextProbablePrime(this));
 }
Esempio n. 2
0
        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;
        }
Esempio n. 3
0
 public bool isProbablePrime(int certainty)
 {
     return(Primality.isProbablePrime(abs(), certainty));
 }