Lines Matching defs:primes
40 * primes - prime table, built to include up to 46345 because
48 long primes[4800];
62 * Initialise primes at run-time rather than compile time
65 primes[0] = 2;
66 primes[1] = 3;
68 for (pc = primes[num_primes-1]; pc < 46345 && pc*pc <= max; pc+=2) {
71 while (j < num_primes && primes[j] * primes[j] <= pc) {
72 if ((rem = pc % primes[j]) == 0)
77 primes[num_primes++] = pc;
90 /* Check to make sure we have enough primes. */
97 while (i < num_primes && val % primes[i] != 0) i++;
101 val % primes[i] == 0) {
102 fact_list[(*num_fact)++] = primes[i];
103 val /= primes[i];