miller rabin Algorithm

The Miller – Rabin primality test or Rabin – Miller primality test is a primality test: an algorithm which determines whether a given number is prime, like to the Fermat primality test and the Solovay – Strassen primality test. It was first observed by Russian mathematician M. M. Artjuhov in 1967.

miller rabin source code, pseudocode and analysis