Skip to content

huonw/slow_primes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

84 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Deprecated in favour of primal.

slow_primes

Build Status Coverage Status

Extremely simplistic and relatively unoptimised handling of basic tasks around primes:

  • checking for primality
  • enumerating primes
  • factorising numbers
  • estimating upper and lower bounds for π(n) (the number of primes below n) and pk (the kth prime)

This uses a basic Sieve of Eratosthenes to enumerate the primes up to some fixed bound (in a relatively memory efficient manner), and then allows this cached information to be used for things like enumerating the primes, and factorisation via trial division.

(Despite the name, it can sieve the primes up to 109 in about 5 seconds.)

Documentation

About

Slow prime-related algorithms

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages