Skip to content

Latest commit

 

History

History
21 lines (11 loc) · 897 Bytes

Readme.md

File metadata and controls

21 lines (11 loc) · 897 Bytes

Please read me 👉👈

What is this project about?

I've created a simple tool which lets you calculate all prime numbers up to a given number. It uses four different algorithms and generates a report to compare the performance of each algorithm.

Which algorithms are used?

  • Algorithm 1: Check all possible divisors from 2 to n-1 for each number

  • Algorithm 2: Check all possible divisors from 2 to sqrt(n) for each number

  • Algorithm 3: Check all possible divisors from 2 to sqrt(n) for each number, but skip all even numbers

  • Sieve of Eratosthenes

What's next?

Currently, algorithm 1 will be skipped for numbers greater than 100000, because it will take over a minute to calculate. In the future, I might add the possibility to customize the maximum runtime that the algorithm is allowed to take.

If you have any ideas, feel free to contribute via issue or pull requests.