FLINT3.7.0-dev

gr_poly_set_fmpz_poly, gr_poly_set_fmpq_poly, gr_poly_set_gr_poly_other

Synopsis#include <flint/gr_poly.h>
int gr_poly_set_fmpz_poly(gr_poly_t res, const fmpz_poly_t src, gr_ctx_t ctx)source
int gr_poly_set_fmpq_poly(gr_poly_t res, const fmpq_poly_t src, gr_ctx_t ctx)source
int gr_poly_set_gr_poly_other(gr_poly_t res, const gr_poly_t x, gr_ctx_t x_ctx, gr_ctx_t ctx)source

Set res to the image of an integer polynomial, a rational polynomial, or a polynomial over the ring x_ctx, converting each coefficient into R with gr_set_fmpz or gr_set_other; for a rational polynomial the integer numerators are converted and multiplied by the inverse of the common denominator in R. The conversion fails (with GR_DOMAIN or GR_UNABLE) if a coefficient has no image, for example a fraction whose denominator is divisible by p in \mathbb{Z}/p\mathbb{Z}.

Cite this page

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