FLINT3.7.0-dev

gr_ctx_init_fq, gr_ctx_init_fq_nmod, gr_ctx_init_fq_zech

Synopsis#include <flint/gr.h>
void gr_ctx_init_fq(gr_ctx_t ctx, const fmpz_t p, slong d, const char * var)source
void gr_ctx_init_fq_nmod(gr_ctx_t ctx, ulong p, slong d, const char * var)source
void gr_ctx_init_fq_zech(gr_ctx_t ctx, ulong p, slong d, const char * var)source

Initialise ctx to the finite field \mathbb{F}_q with q = p^d, using a Conway polynomial if one is in the database and otherwise an irreducible polynomial of minimal weight (see Defining polynomials). The prime p is assumed and not checked. The generator is printed as var, or a if var is NULL. The element types are fq_struct, fq_nmod_struct and fq_zech_struct; the fq_zech field stores discrete logarithm tables of size q, so it is only practical for small q (and requires q < 2^{\mathtt{FLINT\_BITS}}). The contexts allocate the underlying fq_ctx_t. The context of fq_default, which chooses one of these representations from the size of q, is itself a gr context.

Guides#

Cite this page

The FLINT team, “gr_ctx_init_fq, gr_ctx_init_fq_nmod, gr_ctx_init_fq_zech (gr.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/gr_domains/gr_ctx_init_fq.html (generated 2026-10-20).