Commits

dafis committed 6775c82

Add certified and trial division, remove announcement of certificates

Comments (0)

Files changed (1)

Math/NumberTheory/Primes/Testing.hs

 module Math.NumberTheory.Primes.Testing
     ( -- * Standard tests
       isPrime
-      -- $certificates
+    , isCertifiedPrime
+      -- * Partial tests
     , bailliePSW
     , millerRabinV
     , isStrongFermatPP
       -- * Using a sieve
     , FactorSieve
     , fsIsPrime
+      -- * Trial division
+    , trialDivisionPrimeTo
     ) where
 
 import Math.NumberTheory.Primes.Testing.Probabilistic
+import Math.NumberTheory.Primes.Testing.Certified
+import Math.NumberTheory.Primes.Factorisation.TrialDivision
 import Math.NumberTheory.Primes.Sieve.Misc
 
 -- | Test primality using a 'FactorSieve'. If @n@ is out of bounds
     | n <= fromIntegral (fsBound fs)    = fsPrimeTest fs n
     | otherwise = isPrime n
 
--- $certificates
---
--- The tests in this module may wrongly consider some composite numbers as prime.
--- For the Baillie-PSW test, no pseudoprimes are known, and it is known that none
--- exist below @2^64@, so for most practical purposes it can be regarded as conclusive.
--- Nevertheless, it is desirable to certify numbers passing it as primes (or find that
--- they are composite). The addition of prime certificates is planned for the next release.