GiulioM Posted April 10, 2010 Posted April 10, 2010 #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!
UEZ Posted April 10, 2010 Posted April 10, 2010 (edited) 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). UEZps: asm code is not optimized! Edited April 10, 2010 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!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ
AndyG Posted April 10, 2010 Posted April 10, 2010 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
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now