FLINT3.7.0-dev

gr_mpoly_set_coeff_scalar_fmpz, gr_mpoly_set_coeff_ui_fmpz, gr_mpoly_set_coeff_si_fmpz, gr_mpoly_set_coeff_fmpz_fmpz, gr_mpoly_set_coeff_fmpq_fmpz, gr_mpoly_set_coeff_scalar_ui, gr_mpoly_set_coeff_ui_ui, gr_mpoly_set_coeff_si_ui, gr_mpoly_set_coeff_fmpz_ui, gr_mpoly_set_coeff_fmpq_ui

Synopsis#include <flint/gr_mpoly.h>
int gr_mpoly_set_coeff_scalar_fmpz(gr_mpoly_t A, gr_srcptr c, const fmpz * exp, gr_mpoly_ctx_t ctx)source
int gr_mpoly_set_coeff_ui_fmpz(gr_mpoly_t A, ulong c, const fmpz * exp, gr_mpoly_ctx_t ctx)source
int gr_mpoly_set_coeff_si_fmpz(gr_mpoly_t A, slong c, const fmpz * exp, gr_mpoly_ctx_t ctx)source
int gr_mpoly_set_coeff_fmpz_fmpz(gr_mpoly_t A, const fmpz_t c, const fmpz * exp, gr_mpoly_ctx_t ctx)source
int gr_mpoly_set_coeff_fmpq_fmpz(gr_mpoly_t A, const fmpq_t c, const fmpz * exp, gr_mpoly_ctx_t ctx)source
int gr_mpoly_set_coeff_scalar_ui(gr_mpoly_t poly, gr_srcptr c, const ulong * exp, gr_mpoly_ctx_t ctx)source
int gr_mpoly_set_coeff_ui_ui(gr_mpoly_t A, ulong c, const ulong * exp, gr_mpoly_ctx_t ctx)source
int gr_mpoly_set_coeff_si_ui(gr_mpoly_t A, slong c, const ulong * exp, gr_mpoly_ctx_t ctx)source
int gr_mpoly_set_coeff_fmpz_ui(gr_mpoly_t A, const fmpz_t c, const ulong * exp, gr_mpoly_ctx_t ctx)source
int gr_mpoly_set_coeff_fmpq_ui(gr_mpoly_t A, const fmpq_t c, const ulong * exp, gr_mpoly_ctx_t ctx)source

Set the coefficient of the monomial with exponent vector exp (given as fmpz or ulong entries) to c, inserting or removing the term as needed. Each call costs time linear in the number of terms; to build a polynomial term by term, use the push functions below.

Cite this page

The FLINT team, “gr_mpoly_set_coeff_scalar_fmpz, gr_mpoly_set_coeff_ui_fmpz, gr_mpoly_set_coeff_si_fmpz, gr_mpoly_set_coeff_fmpz_fmpz, gr_mpoly_set_coeff_fmpq_fmpz, gr_mpoly_set_coeff_scalar_ui, gr_mpoly_set_coeff_ui_ui, gr_mpoly_set_coeff_si_ui, gr_mpoly_set_coeff_fmpz_ui, gr_mpoly_set_coeff_fmpq_ui (gr_mpoly.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/gr_mpoly/gr_mpoly_set_coeff_scalar_fmpz.html (generated 2026-10-20).