Jump to content

Primes: n*2^m+1: Difference between revisions

→‎{{header|ALGOL 68}}: Specifically state that the hard stretch goal is not satisfied.
(→‎{{header|ALGOL W}}: Only show 45 primes, in line with the new Task requirements.)
(→‎{{header|ALGOL 68}}: Specifically state that the hard stretch goal is not satisfied.)
Line 17:
 
=={{header|ALGOL 68}}==
{{works with|ALGOL 68G|2 or 3Any - Tested with release 3.0.3 under Windows}}
{{libheader|ALGOL 68-primes}}
AttemptsDoesn't attempt the stretchier stretch goal -but withdoes 2000show digitthe precisionprimes and restricting mup to at most 600, all of the first 400 primeswith canuo beto found, except for 383. Increasing the number of2000 digits and maxm nat tomost 8000600 shouldwhich findturns primeout 383,to howeverbe Iall couldn'tof bethem botheredexcept tofor wait long enough..383.<br>
The values of the primes are interesting - most will fit in 64 bits but there are a small number that have hundreds or thousands of digits. <br>
<b>NB</b> the primes.incl.a68 source is available on a page in Rosetta Code - see the <b>library</b> above.
3,048

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.