nmod_mat_print_pretty, nmod_mat_fprint_pretty
Synopsis
#include <flint/nmod_mat.h>void nmod_mat_print_pretty(const nmod_mat_t mat)sourceint nmod_mat_fprint_pretty(FILE * file, const nmod_mat_t mat)sourcePrints a header line with the dimensions and modulus, then one line per row, with the entries in brackets and right-aligned to the number of decimal digits of n. nmod_mat_fprint_pretty returns a positive value on success and a nonpositive value on a write error. Functions with a FILE argument are declared only if <stdio.h> is included before nmod_mat.h.
For example, a 2 \times 3 matrix modulo 2903 is printed as
<2 x 3 integer matrix mod 2903>
[ 0 0 2607]
[ 622 0 0]
For a matrix with no rows or no columns only the header line is printed.
Guides#
Cite this page
The FLINT team, “nmod_mat_print_pretty, nmod_mat_fprint_pretty (nmod_mat.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/nmod_mat/nmod_mat_print_pretty.html (generated 2026-10-20).
@misc{flint-doc-nmod-mat-nmod-mat-print-pretty,
author = {{The FLINT team}},
title = {{nmod\_mat\_print\_pretty, nmod\_mat\_fprint\_pretty (nmod\_mat.h)}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/nmod_mat/nmod_mat_print_pretty.html},
note = {Generated 2026-10-20}
}