Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
The PRIME NUMBERS
#17
It seems the only way to find all primes is to use the old Erathostenes's sieve. Even the second progam Mango posts is using it in a very convoluted way. The complication is to keep the primes stored in a file and only a sliding window on the sieve. The only goal of all this is to save memory, the sieve is still at the base.

This Rich Geldreich's code has been in the ABC packets since it's creation in 1995, but it mentions a 486 in the comments so I imagine the program has more than 10 years!
I have tested it, it calculates all primes up to 2 000 000 in 6 seconds, then it needs 50 seconds to display them..
Antoni
Reply


Messages In This Thread
The PRIME NUMBERS - by Touf - 05-05-2003, 05:46 AM
The PRIME NUMBERS - by toonski84 - 05-05-2003, 06:03 AM
The PRIME NUMBERS - by Plasma - 05-05-2003, 06:09 AM
The PRIME NUMBERS - by Touf - 05-05-2003, 05:54 PM
The PRIME NUMBERS - by Touf - 05-07-2003, 08:23 AM
The PRIME NUMBERS - by Mango - 05-07-2003, 11:51 PM
The PRIME NUMBERS - by ak00ma - 05-08-2003, 01:25 AM
The PRIME NUMBERS - by RST - 05-08-2003, 01:34 AM
The PRIME NUMBERS - by DrV - 05-08-2003, 05:52 AM
The PRIME NUMBERS - by Agamemnus - 05-08-2003, 08:04 AM
The PRIME NUMBERS - by RST - 05-08-2003, 07:12 PM
The PRIME NUMBERS - by Touf - 05-08-2003, 10:22 PM
The PRIME NUMBERS - by Touf - 05-12-2003, 05:47 PM
The PRIME NUMBERS - by Mango - 05-12-2003, 07:53 PM
The PRIME NUMBERS - by Touf - 05-13-2003, 02:52 AM
The PRIME NUMBERS - by wizardlife - 05-13-2003, 03:11 AM
The PRIME NUMBERS - by Antoni Gual - 05-14-2003, 02:31 AM
The PRIME NUMBERS - by Touf - 05-29-2003, 05:46 AM
The PRIME NUMBERS - by Mango - 05-29-2003, 10:16 PM
The PRIME NUMBERS - by Touf - 06-02-2003, 04:31 PM
And the Russians beat the French. - by Agamemnus - 06-02-2003, 11:34 PM
The PRIME NUMBERS - by toonski84 - 06-02-2003, 11:39 PM
Re: And the Russians beat the French. - by Mango - 06-03-2003, 01:09 AM
The PRIME NUMBERS - by Antoni Gual - 06-03-2003, 01:44 AM
The PRIME NUMBERS - by Agamemnus - 06-03-2003, 01:49 AM
The PRIME NUMBERS - by whitetiger0990 - 06-03-2003, 01:56 AM
The PRIME NUMBERS - by Antoni Gual - 06-03-2003, 02:47 AM
The PRIME NUMBERS - by Agamemnus - 06-03-2003, 03:02 AM
Toonski - by Mango - 06-03-2003, 04:32 AM
The PRIME NUMBERS - by toonski84 - 06-03-2003, 04:42 AM
The PRIME NUMBERS - by Antoni Gual - 06-03-2003, 04:48 AM
Antonio...re not using squareroots... - by Mango - 06-03-2003, 05:21 AM
The PRIME NUMBERS - by Antoni Gual - 06-03-2003, 05:37 AM
The PRIME NUMBERS - by Touf - 06-03-2003, 02:07 PM
The PRIME NUMBERS - by Touf - 06-03-2003, 05:09 PM
WHAT! WheRE DID MY POST GO? - by Agamemnus - 06-03-2003, 09:15 PM
The PRIME NUMBERS - by Antoni Gual - 06-03-2003, 10:51 PM
The PRIME NUMBERS - by toonski84 - 06-03-2003, 11:04 PM
The PRIME NUMBERS - by Agamemnus - 06-03-2003, 11:10 PM
The PRIME NUMBERS - by toonski84 - 06-03-2003, 11:16 PM
The PRIME NUMBERS - by ak00ma - 06-04-2003, 12:04 AM
The PRIME NUMBERS - by Touf - 06-04-2003, 12:18 AM
The PRIME NUMBERS - by Antoni Gual - 06-04-2003, 01:01 AM
The PRIME NUMBERS - by Agamemnus - 06-04-2003, 01:43 AM
The PRIME NUMBERS - by whitetiger0990 - 06-04-2003, 01:52 AM
The PRIME NUMBERS - by Neo - 06-04-2003, 02:42 PM
The PRIME NUMBERS - by Mango - 06-04-2003, 07:48 PM
The PRIME NUMBERS - by Antoni Gual - 06-05-2003, 04:13 AM
The PRIME NUMBERS - by Agamemnus - 06-05-2003, 04:19 AM
The PRIME NUMBERS - by Neo - 06-05-2003, 12:12 PM
The PRIME NUMBERS - by Antoni Gual - 06-06-2003, 07:01 PM
The PRIME NUMBERS - by Joakim - 06-08-2003, 02:21 AM
The PRIME NUMBERS - by Agamemnus - 06-08-2003, 04:25 AM
The PRIME NUMBERS - by Antoni Gual - 06-08-2003, 06:20 PM
The PRIME NUMBERS - by whitetiger0990 - 06-09-2003, 04:34 AM
The PRIME NUMBERS - by Antoni Gual - 06-09-2003, 05:01 AM
The PRIME NUMBERS - by oracle - 06-09-2003, 05:12 AM
The PRIME NUMBERS - by Antoni Gual - 06-09-2003, 05:45 AM
The PRIME NUMBERS - by oracle - 06-09-2003, 05:46 AM
The PRIME NUMBERS - by Agamemnus - 06-09-2003, 06:59 AM
The PRIME NUMBERS - by whitetiger0990 - 06-09-2003, 07:24 AM
The PRIME NUMBERS - by Agamemnus - 06-09-2003, 07:30 AM
The PRIME NUMBERS - by whitetiger0990 - 06-09-2003, 07:36 AM
The PRIME NUMBERS - by Agamemnus - 06-09-2003, 11:07 PM
The PRIME NUMBERS - by Mango - 06-09-2003, 11:39 PM
The PRIME NUMBERS - by Antoni Gual - 06-09-2003, 11:53 PM
The PRIME NUMBERS - by whitetiger0990 - 06-10-2003, 12:55 AM
The PRIME NUMBERS - by oracle - 06-10-2003, 06:11 AM
The PRIME NUMBERS - by Antoni Gual - 06-11-2003, 03:01 AM
The PRIME NUMBERS - by Mango - 06-13-2003, 12:55 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)