- 1.1k
- 3
- 14
- 27
- infrequent primality tests of smallish integers (not much bigger than 32 bits)
- primality tests for candidates scattered over unsievably wide ranges
- sifting tiny windows, as in
next_prime(n)
(gaps between primes up to 32 bit are no wider than 335) - eliminating multiples of small primes before doing heavy-duty primality tests like Miller-Rabin Miller-Rabin
- On calculating multiplicative inverses modulo 2^m On calculating multiplicative inverses modulo 2^m (O. Arazi; Hairong Qi) (unfree!)
- On Newton-Raphson iteration for multiplicative inverses On Newton-Raphson iteration for multiplicative inverses (Jean-Guillaume Dumas)
An approach inspired by the deque sieve deque sieve (a.k.a. 'incremental sieve' or 'sliding sieve') would need only a tiny array of 335+1 bytes that can easily be allocated on the stack, and an approach inspired by the windowed Sieve of Eratosthenes would be similarly effective.
- infrequent primality tests of smallish integers (not much bigger than 32 bits)
- primality tests for candidates scattered over unsievably wide ranges
- sifting tiny windows, as in
next_prime(n)
(gaps between primes up to 32 bit are no wider than 335) - eliminating multiples of small primes before doing heavy-duty primality tests like Miller-Rabin
- On calculating multiplicative inverses modulo 2^m (O. Arazi; Hairong Qi) (unfree!)
- On Newton-Raphson iteration for multiplicative inverses (Jean-Guillaume Dumas)
An approach inspired by the deque sieve (a.k.a. 'incremental sieve' or 'sliding sieve') would need only a tiny array of 335+1 bytes that can easily be allocated on the stack, and an approach inspired by the windowed Sieve of Eratosthenes would be similarly effective.
- infrequent primality tests of smallish integers (not much bigger than 32 bits)
- primality tests for candidates scattered over unsievably wide ranges
- sifting tiny windows, as in
next_prime(n)
(gaps between primes up to 32 bit are no wider than 335) - eliminating multiples of small primes before doing heavy-duty primality tests like Miller-Rabin
- On calculating multiplicative inverses modulo 2^m (O. Arazi; Hairong Qi) (unfree!)
- On Newton-Raphson iteration for multiplicative inverses (Jean-Guillaume Dumas)
An approach inspired by the deque sieve (a.k.a. 'incremental sieve' or 'sliding sieve') would need only a tiny array of 335+1 bytes that can easily be allocated on the stack, and an approach inspired by the windowed Sieve of Eratosthenes would be similarly effective.
An approach inspired by the deque sieve deque sieve (a.k.a. 'incremental sieve' or 'sliding sieve') would need only a tiny array of 335+1 bytes that can easily be allocated on the stack, and an approach inspired by the windowed Sieve of Eratosthenes would be similarly effective.
An approach inspired by the deque sieve (a.k.a. 'incremental sieve' or 'sliding sieve') would need only a tiny array of 335+1 bytes that can easily be allocated on the stack, and an approach inspired by the windowed Sieve of Eratosthenes would be similarly effective.
An approach inspired by the deque sieve (a.k.a. 'incremental sieve' or 'sliding sieve') would need only a tiny array of 335+1 bytes that can easily be allocated on the stack, and an approach inspired by the windowed Sieve of Eratosthenes would be similarly effective.
This has already been written about extensively here on Code Review and on Stack Overflow. For example, in this answer elsewhere this answer elsewhere I discussed and benchmarked the skipping of small primes in connection with trial division. This approach is especially effective for applications like next_prime(n)
, since the primes skipped when enumerating candidates can also be excluded from the trial divisions itself. E.g. if enumeration of candidates skips multiples of 2 and 3 then the trial division can start with the prime 5.
This has already been written about extensively here on Code Review and on Stack Overflow. For example, in this answer elsewhere I discussed and benchmarked the skipping of small primes in connection with trial division. This approach is especially effective for applications like next_prime(n)
, since the primes skipped when enumerating candidates can also be excluded from the trial divisions itself. E.g. if enumeration of candidates skips multiples of 2 and 3 then the trial division can start with the prime 5.
This has already been written about extensively here on Code Review and on Stack Overflow. For example, in this answer elsewhere I discussed and benchmarked the skipping of small primes in connection with trial division. This approach is especially effective for applications like next_prime(n)
, since the primes skipped when enumerating candidates can also be excluded from the trial divisions itself. E.g. if enumeration of candidates skips multiples of 2 and 3 then the trial division can start with the prime 5.