padic_radix_mat_det_lu_full, padic_radix_mat_det_levels, padic_radix_mat_det
#include <flint/padic_radix.h>int padic_radix_mat_det_lu_full(padic_radix_t res, const gr_mat_t A, gr_ctx_t ctx)sourceint padic_radix_mat_det_levels(padic_radix_t res, const gr_mat_t A, gr_ctx_t ctx)sourceint padic_radix_mat_det(padic_radix_t res, const gr_mat_t A, gr_ctx_t ctx)sourceSet res to the determinant of the square matrix A. The lu_full version uses Gaussian elimination with full pivoting on valuations (an entry of minimal valuation in the whole remaining submatrix). Then the multipliers and the pivot rows have valuations at least that of the pivot, the Schur complements keep the absolute precision of the input, and the pivots have the valuations of the elementary divisors. For a matrix with entries known to (and ) the determinant is obtained to precision , which is optimal: it is that of the differential . In comparison, division-free algorithms (Berkowitz, cofactor expansion) only give precision about , losing up to digits, and Gaussian elimination with the first nonzero pivot loses precision growing with the dimension for small , even for generic matrices (about 19 digits at for ). If the remaining submatrix consists of zeros, the determinant of that block is bounded using the sums of the row and column minima of the precisions.
The levels version is a blocked form of full pivoting. At the minimal valuation of the current Schur complement , a rank-revealing LU decomposition of over selects rows and columns such that with invertible modulo : these pivots all have valuation , as in full pivoting, and are eliminated at once, with , using the LU decomposition of , triangular solves and one matrix product. The new Schur complement has entries of valuation at least . The precision is again optimal, and the cost is that of a blocked LU decomposition (a single level for a matrix invertible modulo ).
padic_radix_mat_det implements the generic method gr_mat_det: the cofactor formula for , the lu_full version up to a dimension depending on the precision (40 at one limb, 24 at two limbs, 16 beyond), and the levels version above.
The FLINT team, “padic_radix_mat_det_lu_full, padic_radix_mat_det_levels, padic_radix_mat_det (padic_radix.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/padic_radix/padic_radix_mat_det_lu_full.html (generated 2026-11-02).
@misc{flint-doc-padic-radix-padic-radix-mat-det-lu-full,
author = {{The FLINT team}},
title = {{padic\_radix\_mat\_det\_lu\_full, padic\_radix\_mat\_det\_levels, padic\_radix\_mat\_det (padic\_radix.h)}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/padic_radix/padic_radix_mat_det_lu_full.html},
note = {Generated 2026-11-02}
}