FLINT3.7.0-dev

fq_zech_ctx_init_fq_nmod_ctx, fq_zech_ctx_init_fq_nmod_ctx_check

Synopsis#include <flint/fq_zech.h>
void fq_zech_ctx_init_fq_nmod_ctx(fq_zech_ctx_t ctx, fq_nmod_ctx_t ctxn)source
int fq_zech_ctx_init_fq_nmod_ctx_check(fq_zech_ctx_t ctx, fq_nmod_ctx_t ctxn)source

Initialise ctx as the Zech representation of the field of the fq_nmod context ctxn, which is referenced, not copied: it must stay alive while ctx is used and is not cleared with ctx. The defining polynomial must be primitive; fq_zech_ctx_init_fq_nmod_ctx throws FLINT_ERROR otherwise, and the _check version returns 0 instead of 1 (after which the memory allocated for ctx has been freed: ctx must not be used, clearing it is allowed and has no effect, and ctxn remains owned by the caller).

Cite this page

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