Jump to content

Penta-power prime seeds: Difference between revisions

(Added Algol 68)
Line 23:
{{works with|ALGOL 68G|Any - tested with release 3.0.3 under Windows}}
This uses ALGOL 68G's LONG LONG INT during the Miller Rabin testing, under ALGOL 68G version three, the default precision of LONG LONG INT is 72 digits and LONG INT is 128 bit.<br>
A sieve is used to (hopefully) quickly eliminate non-prime n+2 and 2n+1 numbers - MillarMiller Rabin is used for n^2+n+1 etc. that are larger than the sieve.
<br>
This is about 10 times faster than the equivalent Quad-powwr prime seed program, possibly because even numbers are excluded and the n+2 test eliminates more numbers before the higher powers must be calculated..
3,043

edits

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