FLINT3.7.0-dev

udiv_qrnnd

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

Sets qq and rr to the quotient and remainder of n1B+n0n_1 B + n_0 divided by dd, so that n1B+n0=qd+rn_1 B + n_0 = q d + r with 0≤r<d0 \le r < d. Requires n1<dn_1 < d, which ensures that q<Bq < 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-11-02).