Here are some codes to test whether a given integer is prime based Miller-Rabin algorithm.
Thanks to the awesome algorithm,in theory,you could change the parameter of initBaseNumber
to test infinity integer
usage:
git clone https://github.com/sjl623/PrimeTest.git
cd PrimeTest
make
./main
the GMP library is required.
by the way,enable c++ suport when you install GMP by --enable-cxx is also needed.here is more details