Sieve of Pritchard: Difference between revisions
m
→{{header|Julia}}
Tag: Undo |
|||
Line 185:
=={{header|Julia}}==
Added add/remove statistics. "Removed" figure is a combination of composites and primes under sqrt of limit. Getting
<syntaxhighlight lang="julia">""" Rosetta Code task rosettacode.org/wiki/Sieve_of_Pritchard """
Line 203 ⟶ 202:
# the last partial wheel (if present)
if steplength < limit
for w in
n += steplength
end
end
end
Line 214 ⟶ 215:
end
np = 5
rc += 1
members[n] = false
end
end
np < prime && break
|