Lines Matching defs:primes
43 * primes - prime table, built to include up to 46345 because
51 long primes[4800];
66 * Initialise primes at run-time rather than compile time
69 primes[0] = 2;
70 primes[1] = 3;
72 for (pc = primes[num_primes-1]; pc < 46345 && pc*pc <= max; pc+=2) {
75 while (j < num_primes && primes[j] * primes[j] <= pc) {
76 if ((rem = pc % primes[j]) == 0)
81 primes[num_primes++] = pc;
98 /* Check to make sure we have enough primes. */
105 while (i < num_primes && val % primes[i] != 0) i++;
109 val % primes[i] == 0) {
110 fact_list[(*num_fact)++] = primes[i];
111 val /= primes[i];