gr_mat_pow_ui, gr_mat_pow_si, gr_mat_pow_fmpz
Synopsis
#include <flint/gr_mat.h>Set res to A^e for a square matrix, by repeated squaring in the matrix ring (gr_generic_pow_ui, gr_generic_pow_fmpz); a negative exponent requires an invertible matrix. A^0 is the identity. Returns GR_DOMAIN if the matrices are not square of the same size.
Cite this page
The FLINT team, “gr_mat_pow_ui, gr_mat_pow_si, gr_mat_pow_fmpz (gr_mat.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/gr_mat/gr_mat_pow_ui.html (generated 2026-10-20).
@misc{flint-doc-gr-mat-gr-mat-pow-ui,
author = {{The FLINT team}},
title = {{gr\_mat\_pow\_ui, gr\_mat\_pow\_si, gr\_mat\_pow\_fmpz (gr\_mat.h)}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/gr_mat/gr_mat_pow_ui.html},
note = {Generated 2026-10-20}
}