jennico Posted October 23, 2008 Author Posted October 23, 2008 i updated the zip file according to the ideas in this thread. update 23.10. _Primes.au3 v1.2 (corrected _Factorial, improved _IsPrime, _PrimeNext and PrimePrevious, corrected loop declarations) Spoiler I actively support Wikileaks | Freedom for Julian Assange ! | Defend freedom of speech ! | Fight censorship ! | I will not silence.Don't forget this IP: 213.251.145.96
Ximorro Posted July 31, 2009 Posted July 31, 2009 (edited) Really impressive!!!!jennico, I've noticed that in AutoIt testing divisivility with IsInt(a/c) is faster than Mod(a,c) = 0.You also make a division but maybe the fact that the remainder is not needed makes it faster.For instance in your basic IsPrime function (without resorting to SPRR or Miller-Rabin) I've got this improvements just with that change:737373737373737 improves from 16.5 secs to 13.3 secs9007199254740881 from 57.5 secs to 46.5 secsI've also noticed that integer limit is not 2^64, but 2^53. You can see for instance that (2^53+1) - (2^53) is ZERO, not ONE. (So the biggest direct integer prime is 2^53-111 = 9007199254740881). Edited July 31, 2009 by Ximorro
twitchyliquid64 Posted October 14, 2010 Posted October 14, 2010 Love. It. I think Im going to use this to generate Primes for my Public Cryptography Encryption. Just wondering...How did you keep the big numbers from rolling into Sci Notation? ongoing projects:-firestorm: Largescale P2P Social NetworkCompleted Autoit Programs/Scripts: Variable Pickler | Networked Streaming Audio (in pure autoIT) | firenet p2p web messenger | Proxy Checker | Dynamic Execute() Code Generator | P2P UDF | Graph Theory Proof of Concept - Breadth First search
Mat Posted October 14, 2010 Posted October 14, 2010 Love. It.I think Im going to use this to generate Primes for my Public Cryptography Encryption.Just wondering...How did you keep the big numbers from rolling into Sci Notation?If you want to use big numbers, then the no. 1 thing to use is a library made by Eukalyptus here. Several people have tried to write bigint or bignum UDF's (myself included) but none have got anywhere near that set AutoIt Project Listing
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