Copyright | (c) Luis Rodrigues Soares, 2015 |
---|---|

License | MIT |

Maintainer | luis@decomputed.com |

Stability | experimental |

Safe Haskell | Safe-Inferred |

Language | Haskell2010 |

# Documentation

isPrime :: Integral a => a -> Bool Source

The `isPrime`

function checks whether a number `a`

is prime by successively checking the remainder
of the integer division with all numbers up to `a-1`

.

trialAndDivision :: Int -> [Int] Source

The `trialAndDivision`

function calculates prime numbers up to a certain limit by using the traditional
(and very inneficient) trial and division method.

erastothenes :: Int -> [Int] Source

This is a naïve implementation of the Sieve of Erastothenes.