This module defines functions related to prime numbers, and prime factorization.
This is the maximum number of iterations of Solovay-Strassen that will be done to test a number for primality. The chance of error (a composite being labelled prime) is
(expt 2 (- prime:trials))
.
Returns
#f
if n is composite, andt
if it is prime. There is a slight chance,(expt 2 (- prime:trials))
, that a composite will return#t
.
Return the first prime number greater than start. It doesn't matter if start is prime or composite.
Return the first prime number less than start. It doesn't matter if start is prime or composite. If no primes are less than start,
#f
will be returned.