_gr_ore_poly_divrem, gr_ore_poly_divrem, gr_ore_poly_div, gr_ore_poly_rem
#include <flint/gr_ore_poly.h>int _gr_ore_poly_divrem(gr_ptr Q, gr_ptr R, gr_srcptr U, slong lenU, gr_srcptr V, slong lenV, gr_ore_poly_ctx_t ctx)sourceint gr_ore_poly_divrem(gr_ore_poly_t Q, gr_ore_poly_t R, const gr_ore_poly_t U, gr_ore_poly_t V, gr_ore_poly_ctx_t ctx)sourceint gr_ore_poly_div(gr_ore_poly_t Q, const gr_ore_poly_t U, gr_ore_poly_t V, gr_ore_poly_ctx_t ctx)sourceint gr_ore_poly_rem(gr_ore_poly_t R, const gr_ore_poly_t U, gr_ore_poly_t V, gr_ore_poly_ctx_t ctx)sourceCompute the right Euclidean division U = QV + R with \operatorname{ord} R < \operatorname{ord} V, which exists and is unique when the leading coefficient of V and its images under the powers of \sigma are invertible (over a field with \sigma injective, for instance). Each step divides the leading coefficient of the current remainder by \sigma^k(\operatorname{lc}(V)) and subtracts c D^k V, for k from \operatorname{ord} U - \operatorname{ord} V down to 0; the eliminated coefficients of R are then set to exact zeros (in inexact rings they would otherwise only be approximately zero). The non-underscore functions return GR_DOMAIN if V = 0; the underscore version requires \mathit{lenU} \ge \mathit{lenV} \ge 1 and writes \mathit{lenU} - \mathit{lenV} + 1 coefficients of Q and \mathit{lenU} of R. (In FLINT 3.6 and earlier the last step, k = 0, was skipped, so that for example D^2 + D + 1 divided by D gave Q = D and R = 1 + D.)
The FLINT team, “_gr_ore_poly_divrem, gr_ore_poly_divrem, gr_ore_poly_div, gr_ore_poly_rem (gr_ore_poly.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/gr_ore_poly/_gr_ore_poly_divrem.html (generated 2026-10-20).
@misc{flint-doc-gr-ore-poly-gr-ore-poly-divrem,
author = {{The FLINT team}},
title = {{\_gr\_ore\_poly\_divrem, gr\_ore\_poly\_divrem, gr\_ore\_poly\_div, gr\_ore\_poly\_rem (gr\_ore\_poly.h)}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/gr_ore_poly/_gr_ore_poly_divrem.html},
note = {Generated 2026-10-20}
}