FLINT3.7.0-dev

n_redc_half, n_redc_half_fast, n_mulmod_redc_half, n_mulmod_redc_half_fast, n_to_redc_half_preinv

Synopsis#include <flint/nmod.h>
ulong n_redc_half(ulong x, ulong n, ulong nred)source
ulong n_redc_half_fast(ulong x, ulong n, ulong nred)source
ulong n_mulmod_redc_half(ulong a, ulong b, ulong n, ulong nred)source
ulong n_mulmod_redc_half_fast(ulong a, ulong b, ulong n, ulong nred)source
ulong n_to_redc_half_preinv(ulong a, ulong n, ulong ninv, ulong norm)source

The same with R = 2^{\mathtt{FLINT\_BITS}/2}. The reductions require x + (R - 1) n < B, and the ranges of inputs and outputs are those of the corresponding nmod_redc_half functions. n_to_redc_half_preinv ignores norm.

Cite this page

The FLINT team, “n_redc_half, n_redc_half_fast, n_mulmod_redc_half, n_mulmod_redc_half_fast, n_to_redc_half_preinv (nmod.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/nmod/n_redc_half.html (generated 2026-10-20).