FLINT3.7.0-dev

fq_pow, fq_pow_ui

Synopsis#include <flint/fq.h>
void fq_pow(fq_t rop, const fq_t op1, const fmpz_t e, const fq_ctx_t ctx)source
void fq_pow_ui(fq_t rop, const fq_t op, const ulong e, const fq_ctx_t ctx)source

Set rop to \mathit{op}^e for e \ge 0, with \mathit{op}^0 = 1 for every op. fq_pow throws FLINT_ERROR if e < 0. If e \ge p, the exponent is first reduced modulo q - 1.

The power is computed by left-to-right binary exponentiation with _fq_pow, which multiplies by the original (short) representative of op and reduces after every step, so the cost is about \log_2 \min(e, q) squarings and as many multiplications in \mathbb{F}_q.

Cite this page

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