Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
The PRIME NUMBERS
#41
The MATRIX gonna get you

8)
B 4 EVER
Reply
#42
Antoni , is this the program you mailed me ?

If not , mail me your last version please !
have the simplest tastes of the World : I satisfy myself with the best !

http://ToufQb.free.fr
Reply
#43
Touf: Check your e-mail
Antoni
Reply
#44
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.
Reply
#45
where?
[Image: sig.php]
Back by popular demand!
I will byte and nibble you bit by bit until nothing remains but crumbs.
Reply
#46
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 Smile

Mine got till the LONG overflow, that is up to and including 7FFFh Wink
And just in 1,5 hour
Reply
#47
Quote:Mine got till the LONG overflow, that is up to and including 7FFFh Wink
And just in 1,5 hour

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
Reply
#48
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
Reply
#49
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.
Reply
#50
Quote:
Neo Wrote:Mine got till the LONG overflow, that is up to and including 7FFFh Wink
And just in 1,5 hour

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

It wasn't made in QB Smile. 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 Smile
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)