Safe Haskell | None |
---|---|
Language | Haskell98 |
A module providing functions to test for primality, and find next and previous primes.
Documentation
isTrialDivisionPrime :: Integer -> Bool Source #
isPrime :: Integer -> Bool Source #
Is this number prime? The algorithm consists of using trial division to test for very small factors, followed if necessary by the Miller-Rabin probabilistic test.