FLINT3.7.0-dev

fmpzi_divrem

Synopsis#include <flint/fmpzi.h>
void fmpzi_divrem(fmpzi_t q, fmpzi_t r, const fmpzi_t x, const fmpzi_t y)source

Sets q and r to the quotient and remainder of x by y: x = qy + r, where q is x/y with both coordinates rounded to the nearest integer, ties rounded upwards. Then N(r) \le N(y)/2, and the pair is uniquely determined. r may be NULL. Throws if y = 0.

Cite this page

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