Lines Matching refs:primes
31 private static final int[] primes = { 2, 3, 5, 7, 11, 13, 17, 19, 23, 29,
47 private static final BigInteger BIprimes[] = new BigInteger[primes.length];
62 // * It encodes how many i-bit primes there are in the table for
71 static {// To initialize the dual table of BigInteger primes
72 for (int i = 0; i < primes.length; i++) {
73 BIprimes[i] = BigInteger.valueOf(primes[i]);
90 int[] modules = new int[primes.length];
96 if (l < primes[primes.length - 1]) {
97 for (i = 0; l >= primes[i]; i++) {}
114 // To calculate modules: N mod p1, N mod p2, ... for first primes.
115 for (i = 0; i < primes.length; i++) {
116 modules[i] = BigInt.remainderByPositiveInt(startPoint, primes[i]) - gapSize;
120 // probably primes
122 // To discard multiples of first primes
123 for (i = 0; i < primes.length; i++) {
124 modules[i] = (modules[i] + gapSize) % primes[i];
125 j = (modules[i] == 0) ? 0 : (primes[i] - modules[i]);
126 for (; j < gapSize; j += primes[i]) {
131 // primes