Handbook
Glossary
make-sieve ( n -- sieve )
Vocabulary
math
.
primes
.
erato
.
fast
Inputs
n
an
object
Outputs
sieve
an
object
Definition
USING:
bit-arrays
math
math.functions
math.primes.erato.fast.private
sequences
;
IN:
math.primes.erato.fast
::
make-sieve
( n -- sieve )
n
sieve-bits
<bit-array>
:>
sieve
t
0 sieve
set-nth
t
4 sieve
set-nth
n
sqrt
>integer
sieve
[
n sieve
mark-multiples
]
each-prime
sieve
;
inline