FLINT3.7.0-dev

gr_set_ui, gr_set_si, gr_set_fmpz, gr_set_fmpq, gr_set_d

Synopsis#include <flint/gr.h>
int gr_set_ui(gr_ptr res, ulong x, gr_ctx_t ctx)source
int gr_set_si(gr_ptr res, slong x, gr_ctx_t ctx)source
int gr_set_fmpz(gr_ptr res, const fmpz_t x, gr_ctx_t ctx)source
int gr_set_fmpq(gr_ptr res, const fmpq_t x, gr_ctx_t ctx)source
int gr_set_d(gr_ptr res, double x, gr_ctx_t ctx)source

Set res to the image of the integer, rational or double x in the ring.

Guides#

Cite this page

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