Miller-Rabin Primality Test

A deterministic primality test based on Fermat's Little Theorem. See The Structure and Interpretation of Computer Programs, 2nd edition, p56.