Skip to content

fxtlabs/primes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

primes

GoDoc Build Status Coverage Status

Package primes provides simple functionality for working with prime numbers.

Call Sieve(n) to generate all prime numbers less than or equal to n, IsPrime(n) to test for primality, Coprime(a,b) to test for coprimality, and Pi(n) to count (or estimate) the number of primes less than or equal to n.

The algorithms used to implement the functions above are fairly simple; they work well with relatively small primes, but they are definitely not intended for work in cryptography or any application requiring really large primes. Run the benchmarks to check their performance against simpler baseline implementations.

See package documentation for full documentation and examples.

Installation

go get -u github.com/fxtlabs/primes

License

The MIT License (MIT). See the LICENSE file in this directory.

About

A simple Go package for working with prime numbers

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages