FLINT3.7.0-dev

fq_default_pow, fq_default_pow_ui

Synopsis#include <flint/fq_default.h>
void fq_default_pow(fq_default_t rop, const fq_default_t op1, const fmpz_t e, const fq_default_ctx_t ctx)source
void fq_default_pow_ui(fq_default_t rop, const fq_default_t op, const ulong e, const fq_default_ctx_t ctx)source

Set rop to \mathit{op}^e, with 0^0 = 1. In fq_default_pow the exponent may be negative if op is nonzero; 0^e with e < 0 throws FLINT_ERROR.

The power is computed by gr_pow_fmpz or gr_pow_ui for the representation. The polynomial representations reduce e modulo q - 1 when e \ge p and use binary exponentiation, which costs O(\log \min(e, q)) multiplications in \mathbb{F}_q; the Zech representation needs one multiplication of the discrete logarithm by e modulo q - 1.

Guides#

Cite this page

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