ideas-math-types-1.0: Common types for mathematical domain reasoners

Maintainerbastiaan.heeren@ou.nl
Stabilityprovisional
Portabilityportable (depends on ghc)
Safe HaskellSafe
LanguageHaskell2010

Domain.Math.Data.Primes

Description

 
Synopsis

Documentation

primes :: [Int] Source #

All prime numbers smaller than 1000

An infinite list of prime numbers

isPrime :: Int -> Bool Source #

Testing for primality

coprime :: Int -> Int -> Bool Source #

Two numbers are coprime if they do not share a prime factor

primeFactors :: Int -> [Int] Source #

All prime factors of a number

factors :: Int -> [Int] Source #

All factors of a (positive) number

testPrimes :: TestSuite Source #