FLINT3.7.0-dev

udiv_qrnnd

Synopsis#include <flint/longlong.h>
udiv_qrnnd(q, r, n1, n0, d)source

Sets q and r to the quotient and remainder of n_1 B + n_0 divided by d, so that n_1 B + n_0 = q d + r with 0 \le r < d. Requires n_1 < d, which ensures that q < B; otherwise the result is undefined, and on x86-64 the hardware division traps.

Guides#

Cite this page

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