In message <ejnrhs$qd9$1@[EMAIL PROTECTED]
>, Sat, 18 Nov 2006
21:44:30, Mikołaj Herda <mikolajherda@[EMAIL PROTECTED]
> writes
>I have written in Delphi a program for finding big prime numbers, like
this
>one: 90019999973. The program uses the "Erastothenes sieve".
FYI. Via sig line 3, console-mode ERATOST?.PAS will find primes rather
quickly. They are written in BP7, but ERATOST3 has allowance for
getting a bigger range with Delphi. Each *.PAS is about 0.5kB.
For machines other than 8088-based, "set of 0..7" should probably
replaced by a set filling two, four, or more bytes, with consequent
minor adjustments.
ERATOST3 could easily be modified to use Int64.
The limit is probably twice the number of bits in the largest array,
unless one uses array of pointer to array ...
--
(c) John Stockton, Surrey, UK. ?@[EMAIL PROTECTED]
DOS 3.3, 6.20;
WinXP.
Web <URL:http://www.merlyn.demon.co.uk/>
- FAQqish topics, acronyms &
links.
PAS EXE TXT ZIP via
<URL:http://www.merlyn.demon.co.uk/programs/00index.htm>
My DOS <URL:http://www.merlyn.demon.co.uk/batfiles.htm>
- also
batprogs.htm.


|