gr_ctx_init_debug
#include <flint/gr.h>Initialises ctx to a wrapper around the ring elem_ctx that computes as elem_ctx but adds checks. Only a few methods are wrapped (memory management, printing, gr_zero, gr_one, gr_is_zero, gr_is_one, gr_equal, gr_set, gr_neg, gr_add, gr_sub, gr_mul, gr_div, gr_inv, gr_is_invertible, gr_sqrt, gr_rsqrt, gr_pow); the others use the generic defaults. If unable_probability is positive, the wrapped methods randomly return GR_UNABLE and predicates randomly return T_UNKNOWN with that probability, which tests the error handling of algorithms. flags is a combination of the GR_DEBUG_* flags.
Guides#
- Implementing a ring (
gr)
The FLINT team, “gr_ctx_init_debug (gr.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/gr_domains/gr_ctx_init_debug.html (generated 2026-10-20).
@misc{flint-doc-gr-domains-gr-ctx-init-debug,
author = {{The FLINT team}},
title = {{gr\_ctx\_init\_debug (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_debug.html},
note = {Generated 2026-10-20}
}