Jump to content

Sieve of Eratosthenes: Difference between revisions

imported>Polarit
(Elm Sieve function for given range of primes)
Line 6,649:
 
==={{header|Elm Sieve of Eratosthenes function with range of primes}}===
{{incorrect|Bash|This version uses remainder testing (modBy) and so is a trial division algorithm, not a sieve of Eratosthenes.}}
Note: The David Turner algorithm is incorrect as per [https://en.m.wikipedia.org/wiki/Sieve_of_Eratosthenes Sieve of Eratosthenes article on Wikipedia]
 
The range of primes output is defined by the lower and upper limit.
This module exposes the function sieve to be imported by the module Main.
474

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.