_ca_poly_divrem_basecase, ca_poly_divrem_basecase, _ca_poly_divrem, ca_poly_divrem, ca_poly_div, ca_poly_rem
#include <flint/ca_poly.h>void _ca_poly_divrem_basecase(ca_ptr Q, ca_ptr R, ca_srcptr A, slong lenA, ca_srcptr B, slong lenB, const ca_t invB, ca_ctx_t ctx)sourceint ca_poly_divrem_basecase(ca_poly_t Q, ca_poly_t R, const ca_poly_t A, const ca_poly_t B, ca_ctx_t ctx)sourcevoid _ca_poly_divrem(ca_ptr Q, ca_ptr R, ca_srcptr A, slong lenA, ca_srcptr B, slong lenB, const ca_t invB, ca_ctx_t ctx)sourceint ca_poly_divrem(ca_poly_t Q, ca_poly_t R, const ca_poly_t A, const ca_poly_t B, ca_ctx_t ctx)sourceIf the leading coefficient of B is proved nonzero, sets Q and R to the quotient and remainder of the division of A by B, with \deg R < \deg B, and returns 1. Otherwise, in particular if B is zero, returns 0 and leaves the outputs unspecified.
The underscore versions take the precomputed inverse invB of the leading coefficient of B, require \mathit{lenA} \ge \mathit{lenB} \ge 1, and write \mathit{lenA} - \mathit{lenB} + 1 coefficients to Q and \mathit{lenB} - 1 to R. The algorithm is classical long division (the default versions call the basecase versions).
The FLINT team, “_ca_poly_divrem_basecase, ca_poly_divrem_basecase, _ca_poly_divrem, ca_poly_divrem, ca_poly_div, ca_poly_rem (ca_poly.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/ca_poly/_ca_poly_divrem_basecase.html (generated 2026-10-20).
@misc{flint-doc-ca-poly-ca-poly-divrem-basecase,
author = {{The FLINT team}},
title = {{\_ca\_poly\_divrem\_basecase, ca\_poly\_divrem\_basecase, \_ca\_poly\_divrem, ca\_poly\_divrem, ca\_poly\_div, ca\_poly\_rem (ca\_poly.h)}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/ca_poly/_ca_poly_divrem_basecase.html},
note = {Generated 2026-10-20}
}