strongPsuedoprimeTest.frink

Download or view strongPsuedoprimeTest.frink in plain text format


/** This tests strong pesudoprime algorithms with limited bases.

    see http://miller-rabin.appspot.com/
*/

a = 9345883071009581737
//a = 2

for n = 2 to 341531+1
   if isStrongPseudoprime[n, a] != isPrime[n]
      println["Error at $n"]


Download or view strongPsuedoprimeTest.frink in plain text format


This is a program written in the programming language Frink.
For more information, view the Frink Documentation or see More Sample Frink Programs.

Alan Eliasen was born 20218 days, 0 hours, 23 minutes ago.