1.1.0 • Published 3 years ago

simple-prime-generator v1.1.0

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

Generate prime numbers

3 strategies

  • Naive (O(n^2)) -> naive
  • Optimized (O(n^3/2)) -> opt
  • Eratosthenes' sieve (O(n*log(log(n)))) -> best

Run in the console

Examples:

gen-primes 1 10 naive
->[ 2, 3, 5, 7 ]
gen-primes 1 10 opt
->[ 2, 3, 5, 7 ]
gen-primes 1 10 best
->[ 2, 3, 5, 7 ]
1.1.0

3 years ago

1.0.9

3 years ago

1.0.10

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago