FLINT3.7.0-dev

gr_ctx_init_dirichlet_group

Synopsis#include <flint/gr.h>
int gr_ctx_init_dirichlet_group(gr_ctx_t ctx, ulong q)source

Initialises ctx to the group G_q of Dirichlet characters modulo q, with elements of type dirichlet_char_struct. Returns GR_DOMAIN if q = 0 and GR_UNABLE if q has a prime factor larger than 10^{16}, which dirichlet_group_init does not support; in both cases ctx is not initialised.

Cite this page

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