FLINT3.7.0-dev

fq_ctx_init

Synopsis#include <flint/fq.h>
void fq_ctx_init(fq_ctx_t ctx, const fmpz_t p, slong d, const char * var)source

Initialises ctx as a context for \mathbb{F}_{p^d}, d \ge 1, with the generator printed as var, a nonempty null-terminated string. The defining polynomial is the Conway polynomial for (p, d) if it is in FLINT's table, and otherwise a random sparse irreducible polynomial (a trinomial or pentanomial if one is found). p must be prime; this is not checked.

The table covers all primes below 110000 for some degrees: degrees up to 409 for p = 2 and up to about 200 for p < 20, fewer for larger p, and only d \le 4 above 11000 (see Defining polynomials). The random choice uses a fixed random state, so it is reproducible, but it depends on the FLINT version.

Cite this page

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