Skip to main content

Module algebraic

Module algebraic 

Source
Expand description

Level 2 — ℚ̄. Exact algebraic numbers as (minimal polynomial, isolating interval) pairs.

We never store the decimal expansion of √2: we store that it is the unique root of x² - 2 in (1, 2). Arithmetic on algebraic numbers is done with resultants — the sum α+β is a root of Res_y(p(y), q(x-y)) and the product is a root of Res_y(p(y), yᵈ q(x/y)) — followed by factorization over ℚ and re-isolation of the relevant root.

Resultants are computed as Sylvester-matrix determinants over the polynomial ring ℚ[x], using the fraction-free Bareiss algorithm so every intermediate division is exact.

Structs§

AlgebraicNumber
An exact real algebraic number (Level 2).
Polynomial
A univariate polynomial with exact rational coefficients.