FLINT3.7.0-dev

gr_zero, gr_one, gr_neg_one

Synopsis#include <flint/gr.h>
int gr_zero(gr_ptr res, gr_ctx_t ctx)source
int gr_one(gr_ptr res, gr_ctx_t ctx)source
int gr_neg_one(gr_ptr res, gr_ctx_t ctx)source

Set res to 0, 1 or -1. gr_one fails with GR_DOMAIN in structures without a unit element (for example the domain of matrices of all shapes created by gr_ctx_init_matrix_domain).

Guides#

Cite this page

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