FLINT3.7.0-dev

n_CRT

Synopsis#include <flint/ulong_extras.h>
ulong n_CRT(ulong r1, ulong m1, ulong r2, ulong m2)source

Returns the unique 0 \le x < m_1 m_2 with x \equiv r_1 \pmod{m_1} and x \equiv r_2 \pmod{m_2}. Requires coprime m_1, m_2 > 1 with m_1 m_2 fitting in a ulong, and reduced r_1, r_2. Nothing is checked.

Cite this page

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