FLINT3.7.0-dev

gr_ctx_init_nf, gr_ctx_init_nf_fmpz_poly

Synopsis#include <flint/gr.h>
void gr_ctx_init_nf(gr_ctx_t ctx, const fmpq_poly_t poly)source
void gr_ctx_init_nf_fmpz_poly(gr_ctx_t ctx, const fmpz_poly_t poly)source

Initialise ctx to the number field \mathbb{Q}[a]/(f) defined by the polynomial f = poly, with elements of type nf_elem_struct (see nf_elem). The polynomial must be irreducible; this is not checked. The context allocates an nf_t with precomputed data, so it is more expensive to create than most contexts. Declared only if fmpq_poly.h is included before gr.h.

Guides#

Cite this page

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