Data-Structures-and-Algorithms-in-cpp icon indicating copy to clipboard operation
Data-Structures-and-Algorithms-in-cpp copied to clipboard

Create Miller-Rabin_primalityTest.cpp

Open Swish78 opened this issue 2 years ago • 1 comments

This code checks if a given number is likely to be a prime using the Miller-Rabin primality test, which is a probabilistic algorithm. The algorithm chooses a random number and tests whether it is a witness for the compositeness of the given number. This is repeated a number of times to increase the confidence in the result. If the number passes all tests, it is considered likely to be prime.

Swish78 avatar Apr 21 '23 16:04 Swish78

Thanks for opening this pull request! Please be sure that you have checked out our contributing guidelines.

welcome[bot] avatar Apr 21 '23 16:04 welcome[bot]