06-04-2003, 12:04 AM
The MATRIX gonna get you
8)
8)
B 4 EVER
The PRIME NUMBERS
|
06-04-2003, 12:18 AM
Antoni , is this the program you mailed me ?
If not , mail me your last version please !
06-04-2003, 01:43 AM
there is stuff missing in other sections, too!!!!
EDIT: Projects section.
Peace cannot be obtained without war. Why? If there is already peace, it is unnecessary for war. If there is no peace, there is already war."
Visit www.neobasic.net to see rubbish in all its finest.
06-04-2003, 01:52 AM
where?
06-04-2003, 02:42 PM
Quote:I left my computer on running your program last night dav... It went up and over 14,000,000 primes somehow. Whow! 14,000,000! Not bad Mine got till the LONG overflow, that is up to and including 7FFFh And just in 1,5 hour
06-04-2003, 07:48 PM
Quote:Mine got till the LONG overflow, that is up to and including 7FFFh That's pretty good. What's your method? I just compiled a slightly modified version (doesn't poll the timer, instead prints a prime every 64 k found) of mine and it's running in a background window on a 1.5 GHz machine...it's been on for a whopping 7 min 20 sec and the most recent prime is 19,562,177...at this rate, mine's not set to overflow the long integer until about 13 hrs. I'd like to see your method...it kicks my methods ass. Is it a method that picks primes with high probability, or does it exhastively prove each prime? Anyway...we're up to 11 min, 30 sec and latest prime is.... 27,033,163... edits: 36 min...60,193,877 3 h 41 min...240,677,251
06-05-2003, 04:13 AM
Mango:
First of all your method is faster than your results. You should leave the computer runing your compiled program alone in the foreground. This way you should reach the long overflow before 4 hours. And the 1,5 hour could be reached by the program by Rich Geldreich you posted when this challenge started (you said clearly you did'nt write it). I have no patience to check it but it could reach the limits in 1,5 hour as Neo says. Remember i'ts a program ported from the computer bible "The Art of Computer Programming" so it should be good. By the way , could someone explain me how does it work? Edited: About speed, don't forget there are AMD processors abe to run 16 bits apps 3 times faster than a P4 1,5...Any speed comparison should be done in the same computer!
Antoni
06-05-2003, 04:19 AM
It checks every odd number for primality by seeing if it is evenly divisible by every number that is less than 32767.
The reason is that it is slower to do mod using integers, but you can only check up to 32761 (I think it's a prime) squared. A number can be checked for primality by just doing mod all primes less than the square root of that number because you just check the same numbers over again after... (x+1)(x-1) (x-1)(x+1)
Peace cannot be obtained without war. Why? If there is already peace, it is unnecessary for war. If there is no peace, there is already war."
Visit www.neobasic.net to see rubbish in all its finest.
06-05-2003, 12:12 PM
Quote:Neo Wrote:Mine got till the LONG overflow, that is up to and including 7FFFh It wasn't made in QB . However, these are the test results with my program made in QB: 1 min: 2,000,000 2 min: 4,031,482 1 h: 240,482,843 The programming algorithm was the Sea of Erathetos. However, there are much faster algorithms |
« Next Oldest | Next Newest »
|