Flint2: Haskell bindings for the flint library for number theory

[ gpl, library, math ] [ Propose Tags ]

This library provides access to the functionality of the FLINT. FLINT is a C library for doing number theory, freely available under the GNU LGPL. At its core, FLINT provides arithmetic in standard rings such as the integers, rationals, algebraic, real, complex and p-adic numbers, finite fields, and number fields. It also provides polynomials (univariate and multivariate), power series, and matrices. FLINT has been used for many large scale research computations (e.g. A Trillion Triangles) and has been cited in hundreds of publications. FLINT's authors themselves have published more than 20 papers describing new algorithms first implemented within or on top of FLINT.

[Skip to Readme]


[Index] [Quick Jump]


Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees


Versions [RSS],,,,, (info)
Change log ChangeLog.md
Dependencies base (>=4.7 && <5), containers (>=0.6.5 && <0.7), groups (>=0.5.3 && <0.6), QuickCheck (>=2.14.3 && <2.15) [details]
License GPL-2.0-only
Copyright Copyright (c) 2023 Hartmut Monien
Author Hartmut Monien
Maintainer hmonien@uni-bonn.de
Category Math
Home page https://github.com/monien/Flint2#readme
Bug tracker https://github.com/monien/Flint2/issues
Source repo head: git clone https://github.com/monien/Flint2
Uploaded by monien at 2023-11-17T12:44:26Z
Reverse Dependencies 1 direct, 0 indirect [details]
Downloads 37 total (4 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs uploaded by user
Build status unknown [no reports yet]

Readme for Flint2-

[back to package description]

examples of complex_plot in Flint2-examples


Flint2 provides a thin Haskell wrapper for Flint C-library.


  • Install the C-library available from Flint. There are packages available for various operating systems.

  • Install the Haskell interface with

cabal install Flint2 --lib

The depencies are minimal. Flint2 relies on just three libraries: QuickCheck, groups, containers.

Quick Start

A simple example for the application of the library is the factorization of \(2^{256}-1\):

import Data.Number.Flint

main = print $ factor (2^256 - 1 :: Fmpz)

runnnig main prints


examples can be found soon in Flint2-Examples