Miller-Rabin primality test
The Miller-Rabin primality test is a probabilistic algorithm used to determine if a number is prime. It works by checking certain properties of the number against randomly chosen bases. If a number passes the test for several bases, it is likely prime, but if it fails for any base, it is definitely composite.
This test is efficient for large numbers and is commonly used in cryptography, where prime numbers play a crucial role. While it does not guarantee a definitive answer, increasing the number of bases tested improves the accuracy of the result, making it a practical choice for primality testing.