| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Factory.Math.Implementations.Primality
Description
AUTHOR- Dr. Alistair Ward
DESCRIPTION
- Determines whether an integer is prime.
- https://en.wikipedia.org/wiki/Primality_test.
- https://primes.utm.edu/index.html
- CAVEAT: it doesn't determine the prime-factors of composite numbers, just that they exist.
Synopsis
- data Algorithm factorisationAlgorithm
- = AKS factorisationAlgorithm
- | MillerRabin
Types
Data-types
data Algorithm factorisationAlgorithm Source #
The algorithms by which primality-testing has been implemented.
Constructors
| AKS factorisationAlgorithm | |
| MillerRabin | https://en.wikipedia.org/wiki/Miller%E2%80%93Rabin_primality_test. |
Instances
| Eq factorisationAlgorithm => Eq (Algorithm factorisationAlgorithm) Source # | |
| Read factorisationAlgorithm => Read (Algorithm factorisationAlgorithm) Source # | |
| Show factorisationAlgorithm => Show (Algorithm factorisationAlgorithm) Source # | |
| Default (Algorithm factorisationAlgorithm) Source # | |
Defined in Factory.Math.Implementations.Primality | |
| Algorithmic factorisationAlgorithm => Algorithmic (Algorithm factorisationAlgorithm) Source # | |