FLINT3.7.0-dev
Overview

Exact real and complex numbers

FLINT computes exactly with algebraic numbers, represented by minimal polynomials and isolating balls (qqbar.h), and with real and complex numbers built from rational numbers by arithmetic, roots, exponentials, logarithms and other functions, represented as elements of formal fields (ca.h). The sections below describe how these representations are constructed and certified, how arithmetic is carried out, how equality is tested, and how polynomial roots and linear algebra are computed on top of them. The overview compares the representations and says which algorithm each operation uses. The design is described in [Joh2021calcium].

In this section#

OverviewChoosing a representation for exact numbersFLINT represents exact real and complex numbers as rationals, elements of a fixed number field, individual algebraic numbers (qqbar) or elements of formal fields with transcendental generators (ca). This page compares what each representation can decide, what it costs, and which algorithms the main operations use.AlgorithmAlgebraic numbers by minimal polynomial and isolating ballThe canonical representation of an algebraic number by its minimal polynomial over Z and a complex ball isolating one root, its certification by the interval Newton method, refinement, and exact decisions of equality, realness and signs, as implemented in qqbar.AlgorithmArithmetic with algebraic numbersHow qqbar computes x + y, x - y, xy and x/y exactly: composed polynomials from power sums, factorisation and numerical selection of the right factor, closed forms and certified norms for quadratic operands, half-degree polynomials for conjugates, linear algebra in a common number field or cyclotomic field found by LLL, and guessed minimal polynomials with a proof of correctness.AlgorithmFormal fields and the ideal of relationsHow ca represents numbers as rational functions in extension numbers, modulo an ideal of algebraic relations that is built when a field is created, from minimal polynomials, defining equations of roots and powers, Vieta's formulas, integer relations between logarithms and exponentials found by LLL and proved exactly, functional equations and a Gröbner basis.AlgorithmZero testingWhy deciding x = 0 is hard for exact real and complex numbers, what is known about decidability, and how ca combines numerical evaluation in ball arithmetic (which proves x ≠ 0) with exact methods (formal reduction, evaluation as an algebraic number, rewriting in a normal form, factoring) that prove x = 0.AlgorithmSimplification and closed formsThe simplifications that ca applies automatically (canonical number field representations, reduction modulo relations, rewriting rules for exponentials, logarithms, powers and roots), and the LLL-based methods with exact verification that qqbar uses to recognise algebraic numbers, express them in a given field and find closed forms with radicals and trigonometric functions.AlgorithmLinear algebra over exact numbersGaussian elimination, fraction-free elimination, division-free determinants and characteristic polynomials, eigenvalues, Jordan forms and matrix functions over exact real and complex numbers, where every pivot decision is a zero test that may fail; how ca_mat builds on the generic gr_mat algorithms and specialises to rational and number field matrices.

Referenced from#

References#

Cite this page

The FLINT team, “Exact real and complex numbers,” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/algorithms/exact/index.html (generated 2026-10-20).