Jump to content

Prime Numbers Founder + Checker


GiulioM
 Share

Recommended Posts

#1. Uses sieve of Erathostenes* to find prime numbers from 2 to n.

#2. Using the same method* checks if a number is prime.

*= Uses _MathCheckDiv($number, $div) repeated with these values for $div: 2, 3, 5, 7, 11

---unable to upload files---

Use these links:

#1 http://www.gigasize.com/get.php?d=ckdomoc56wc

#2 http://www.gigasize.com/get.php?d=c08fxhhyhqb

PLEASE NOTE: THESE FILES WILL BE AVAILABLE ONLY UNTIL ABOUT 1ST August!

Link to comment
Share on other sites

I've written something similar but with my 1st ASM code -> #779132 :(

Took on my notebook 0.11 sec. to sieve to number 1299709 (100000 prime numbers). :)

UEZ

ps: asm code is not optimized!

Edited by UEZ

Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Link to comment
Share on other sites

Last march the monthly "µIT"-contest in the german AutoIt-Forum was about "Calculate the first 100000 primes!"....we are still waiting for the evaluation   :(

With "native" AutoIt-code I have tried several algorithms, unfortunately the "brute force"-Sieve of Eratosthenes was the fastest. There are so nice algorithms out there  :)

Andy

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...