FLINT3.7.0-dev

gr_mpoly_divrem, gr_mpoly_divrem_heap, gr_mpoly_divrem_heap_threaded, gr_mpoly_div, gr_mpoly_div_heap_threaded

Synopsis#include <flint/gr_mpoly.h>
int gr_mpoly_divrem(gr_mpoly_t Q, gr_mpoly_t R, const gr_mpoly_t A, const gr_mpoly_t B, gr_mpoly_ctx_t ctx)source
int gr_mpoly_divrem_heap(gr_mpoly_t Q, gr_mpoly_t R, const gr_mpoly_t A, const gr_mpoly_t B, gr_mpoly_ctx_t ctx)source
int gr_mpoly_divrem_heap_threaded(gr_mpoly_t Q, gr_mpoly_t R, const gr_mpoly_t A, const gr_mpoly_t B, gr_mpoly_ctx_t ctx)source
int gr_mpoly_div(gr_mpoly_t Q, const gr_mpoly_t A, const gr_mpoly_t B, gr_mpoly_ctx_t ctx)source
int gr_mpoly_div_heap_threaded(gr_mpoly_t Q, const gr_mpoly_t A, const gr_mpoly_t B, gr_mpoly_ctx_t ctx)source

Multivariate division with remainder: A = QB + R where no monomial of R is divisible by the leading monomial of B. The div versions return only Q. Over a field this always works; over other rings it works whenever each division by the leading coefficient of B that occurs is exact, and returns GR_DOMAIN (with Q and R set to zero) otherwise. The defaults use the threaded algorithm for |A| > 500, |B| > 2 and a thread-safe ring when threads are available.

Guides#

Cite this page

The FLINT team, “gr_mpoly_divrem, gr_mpoly_divrem_heap, gr_mpoly_divrem_heap_threaded, gr_mpoly_div, gr_mpoly_div_heap_threaded (gr_mpoly.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/gr_mpoly/gr_mpoly_divrem.html (generated 2026-10-20).