Home | History | Annotate | Download | only in primes

Lines Matching refs:stop

55  *	primes [-dh] [start [stop]]
57 * Print primes >= start and < stop. If stop is omitted,
101 uint64_t stop; /* don't generate at or above this value */
121 stop = (uint64_t)(-1);
131 /* Start and stop supplied on the command line. */
143 stop = strtoumax(argv[1], &p, 0);
168 if (start > stop)
169 errx(1, "start value must be less than stop value.");
170 primes(start, stop);
206 * primes - sieve and print primes from start up to and but not including stop
209 primes(uint64_t start, uint64_t stop)
227 if (stop < 3) {
228 stop = 2;
230 if (stop <= start) {
240 if (stop != 2 && (stop&0x1) == 0) {
241 ++stop;
250 factor < stop && p <= pr_limit; factor = *(++p)) {
269 * upward until we pass the stop point
271 while (start < stop) {
290 if (stop-start > TABSIZE+TABSIZE) {
294 tab_lim = &table[(stop-start)/2]; /* partial sieve */
295 fact_lim = sqrt(stop+1.0);
338 (void)fprintf(stderr, "usage: primes [-dh] [start [stop]]\n");