gr_pow, gr_pow_ui, gr_pow_si, gr_pow_fmpz, gr_pow_fmpq, gr_pow_other, gr_other_pow
#include <flint/gr.h>Set res to x^y. Fail with GR_DOMAIN if the power has no value in the ring (for example 0^{-1}, 2^{-1} in \mathbb{Z}, (-1)^{1/2} in \mathbb{R}).
For integer exponents the default implementations use binary exponentiation, inverting x first when the exponent is negative (gr_generic_pow_ui, gr_generic_pow_fmpz). For y = p/2 the default of gr_pow_fmpq uses gr_sqrt or gr_rsqrt and then an integer power; other rational exponents are converted to the ring and passed to gr_pow. In subrings of \mathbb{C} a non-integer power is the principal branch x^y = \exp(y \log x) for x \ne 0. In other rings the meaning of a non-integer power is defined by the ring; most return GR_UNABLE.
Guides#
The FLINT team, “gr_pow, gr_pow_ui, gr_pow_si, gr_pow_fmpz, gr_pow_fmpq, gr_pow_other, gr_other_pow (gr.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/gr/gr_pow.html (generated 2026-10-20).
@misc{flint-doc-gr-gr-pow,
author = {{The FLINT team}},
title = {{gr\_pow, gr\_pow\_ui, gr\_pow\_si, gr\_pow\_fmpz, gr\_pow\_fmpq, gr\_pow\_other, gr\_other\_pow (gr.h)}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/gr/gr_pow.html},
note = {Generated 2026-10-20}
}