Could anyone please help refer me to a site that uses a fairly complex method to determine prime numbers? i need a program that generates all the prime numbers between 0-1,000,000 that i could parallelise but all the solutions i find are fairly simple.
Could anyone please help refer me to a site that uses a fairly complex method to determine prime numbers? i need a program that generates all the prime numbers between 0 - 1,000,000 that i could parallelise but all the solutions i find are fairly simple.
I can help you with this task. Finding all prime numbers within 0 - 1'000'000 is not difficult.
If you want to use use threads (which you do), then you can start 2 threads where one starts at 0 and the second starts at 1000000. The first starts counting up and the second starts counting down whilst checking if the numbers it goes through are prime. They both stop at 500, 000. You could use threads this way. Also it is faster.