FLINT3.7.0-dev

gr_cmp, gr_cmp_other

Synopsis#include <flint/gr.h>
int gr_cmp(int * res, gr_srcptr x, gr_srcptr y, gr_ctx_t ctx)source
int gr_cmp_other(int * res, gr_srcptr x, gr_srcptr y, gr_ctx_t y_ctx, gr_ctx_t ctx)source

Set *res to -1, 0 or 1 according to whether x < y, x = y or x > y. Fail with GR_DOMAIN if the ring is not ordered and with GR_UNABLE if the comparison cannot be decided (overlapping balls).

Guides#

Cite this page

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