189.lucas
Ernst Mayer
Number theory: primality testing
Performs the Lucas-Lehmer test to check primality of Mersenne numbers 2^p-1, using arbitrary-precision (array-integer) arithmetic. Accomplishes the Mersenne-mod squaring via the discrete weighted transform technique of Crandall and Fagin (Math. Comp. 62 (205), pp.305-324, January 1994). Uses a data-local, cache-friendly FFT to efficiently perform the large-integer squaring of the Lucas-Lehmer iterations.
Attempt to prove the primality of a large number.
The proof (or disproof) is not completed in the time allotted for the benchmark. Therefore, a hex residue is provided to verify that the algorithm is on track towards the proof (or disproof).
Fortran-90
None