Lines Matching refs:start
55 * primes [-h] [start [stop]]
57 * Print primes >= start and < stop. If stop is omitted,
58 * the value 4294967295 (2^32-1) is assumed. If start is
59 * omitted, start is read from standard input.
97 ubig start; /* where to start generating */
114 start = 0;
130 start = strtoumax(argv[0], &p, 0);
149 start = strtoumax(argv[0], &p, 0);
156 start = read_num_buf();
162 if (start > stop)
163 errx(1, "start value must be less than stop value.");
164 primes(start, stop);
200 * primes - sieve and print primes from start up to and but not including stop
203 primes(ubig start, ubig stop)
217 if (start < 3) {
218 start = (ubig)2;
223 if (stop <= start) {
230 if (start != 2 && (start&0x1) == 0) {
231 ++start;
240 if (start <= *pr_limit) {
241 /* skip primes up to the start value */
244 if (factor >= start) {
252 start = *pr_limit+2;
259 while (start < stop) {
264 factor = (start%(2*3*5*7*11*13))/2; /* starting copy spot */
278 if (stop-start > TABSIZE+TABSIZE) {
280 fact_lim = sqrt(start+1.0+TABSIZE+TABSIZE);
282 tab_lim = &table[(stop-start)/2]; /* partial sieve */
290 mod = start%factor;
306 for (q = table; q < tab_lim; ++q, start+=2) {
308 if (start > SIEVEMAX) {
309 if (!isprime(start))
312 printf(hflag ? "%" PRIx64 "\n" : "%" PRIu64 "\n", start);
321 fprintf(stderr, "usage: primes [-h] [start [stop]]\n");