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