Efficient basic number-theoretic functions. Primes, powers, integer logarithms.

Version on this page:
LTS Haskell 20.24:
Stackage Nightly 2023-06-04:
Latest on Hackage:

See all snapshots arithmoi appears in

MIT licensed by Daniel Fischer
Maintained by Daniel Fischer
This version can be pinned in stack with:arithmoi-,4205

Module documentation for

  • Math
    • Math.NumberTheory
      • Math.NumberTheory.GCD
        • Math.NumberTheory.GCD.LowLevel
      • Math.NumberTheory.Logarithms
      • Math.NumberTheory.Lucas
      • Math.NumberTheory.Moduli
      • Math.NumberTheory.MoebiusInversion
        • Math.NumberTheory.MoebiusInversion.Int
      • Math.NumberTheory.Powers
        • Math.NumberTheory.Powers.Cubes
        • Math.NumberTheory.Powers.Fourth
        • Math.NumberTheory.Powers.General
        • Math.NumberTheory.Powers.Integer
        • Math.NumberTheory.Powers.Squares
      • Math.NumberTheory.Primes
        • Math.NumberTheory.Primes.Counting
        • Math.NumberTheory.Primes.Factorisation
          • Math.NumberTheory.Primes.Factorisation.Certified
        • Math.NumberTheory.Primes.Heap
        • Math.NumberTheory.Primes.Sieve
        • Math.NumberTheory.Primes.Testing
          • Math.NumberTheory.Primes.Testing.Certificates

A library of basic functionality needed for number-theoretic calculations. The aim of this library is to provide efficient implementations of the functions. Primes and related things (totients, factorisation), powers (integer roots and tests, modular exponentiation), integer logarithms. Note: Requires GHC >= 6.12 with the integer-gmp package for efficiency. Portability is on the to-do list (with low priority, however).