Jump to content
Sign in to follow this  
GiulioM

Prime Numbers Founder + Checker

Recommended Posts

GiulioM

#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!

Share this post


Link to post
Share on other sites
UEZ

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!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Share this post


Link to post
Share on other sites
AndyG

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

Share this post


Link to post
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
Sign in to follow this  

×