Skip to content

CanePlayz/prime-numbers-report

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

A simple tool to calculate prime numbers and compare algorithms

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages