FLINT3.7.0-dev

fmpz_mat_snf_diagonal

Synopsis#include <flint/fmpz_mat.h>
void fmpz_mat_snf_diagonal(fmpz_mat_t S, const fmpz_mat_t A)source

Sets SS to the Smith normal form of the diagonal matrix AA, by replacing pairs of diagonal entries by their gcd and lcm. AA need not be square; that it is diagonal is not checked, and only its diagonal is used. SS may be AA.

Cite this page

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