Skip to content

diegojromerolopez/eratosthenes-sieve

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Eratosthenes' Sieve

An implemententation of the Sieve of Eratosthenes in Golang.

Use

Use eratosthenessieve.SieveOfErathostenes

// Use an auxiliar primeStorer function that will
// store each one of the prime numbers found
var primes []*big.Int
primeStorer := func(prime *big.Int) {
    primes = append(primes, prime)
}

// Create a new Sieve of Eratosthenes and run it
sieve := newSieveOfEratosthenes(n, primeStorer)
sieve.Run()

Contact me

Contact me at diegojromerolopez at gmail dot com

License

MIT

About

An implemententation of the Sieve of Eratosthenes in Golang

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages