P#73029 2020-02-12 18:25

:: RabbleRousy

@dw817 yeah that‘s kinda integrated in the algorithm. The way it works is that for each candidate it check‘s wether it is dividable by another already found prime number. Starting with 2 (which then get‘s all the numbers ending with 0,2,4,6 and 8), then 3, then 5 and so on.

P#73058 2020-02-13 10:55

:: RabbleRousy

Before anyone points it out: a friend of mine already found out that I didn‘t catch the error when the program reaches 2^15 (program crashes and show‘s prime number: -1). Will fix that soon!:D

P#73059 2020-02-13 10:58

[Please log in to post a comment]