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)sourcevoid gr_ctx_init_nf_fmpz_poly(gr_ctx_t ctx, const fmpz_poly_t poly)sourceInitialise 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#
- Getting started with nf_elem (
nf_elem)
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).
@misc{flint-doc-gr-domains-gr-ctx-init-nf,
author = {{The FLINT team}},
title = {{gr\_ctx\_init\_nf, gr\_ctx\_init\_nf\_fmpz\_poly (gr.h)}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/gr_domains/gr_ctx_init_nf.html},
note = {Generated 2026-10-20}
}