FLINT3.7.0-dev

_fmpz_mat_reconstruct_matwise

Synopsis#include <flint/fmpz_mat.h>
int _fmpz_mat_reconstruct_matwise(fmpz_mat_t Z, fmpz_t den, const fmpz_mat_t x, const fmpz_t m, const fmpz_t N, const fmpz_t D, const fmpz_t den_init)source

Tries to reconstruct a matrix Z/\mathit{den} congruent to x modulo m, with entries of Z bounded by N in absolute value and a common denominator at most D that is a multiple of den_init. Each entry is first tried with the denominator found so far, and otherwise rationally reconstructed with numerator bound N and denominator bound D/\mathit{den}, the new factor being multiplied into den and the earlier entries. Returns 1 on success and 0 if an entry could not be reconstructed. The result is unique when 2ND < m.

Cite this page

The FLINT team, “_fmpz_mat_reconstruct_matwise (fmpz_mat.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/fmpz_mat/_fmpz_mat_reconstruct_matwise.html (generated 2026-10-20).