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