HELP: miller-rabin
{ $values
{ "n" integer }
- { "?" "a boolean" }
+ { "?" boolean }
}
{ $description "Returns true if the number is a prime. Calls " { $link miller-rabin* } " with a default of 10 Miller-Rabin tests." } ;
HELP: miller-rabin*
{ $values
{ "n" integer } { "numtrials" integer }
- { "?" "a boolean" }
+ { "?" boolean }
}
{ $description "Performs " { $snippet "numtrials" } " trials of the Miller-Rabin probabilistic primality test algorithm and returns true if prime." } ;