_nmod_mul_halflimb
Synopsis
#include <flint/nmod.h>Returns for reduced operands. Requires , which NMOD_IS_HALFLIMB tests; for larger the result is wrong. The product then fits in one word, and is reduced with the one-word Barrett step of NMOD_RED (Low-level macros), which is shorter than the two-word reduction of nmod_mul. To use it in a loop, test the modulus once and write two loops, one with _nmod_mul_halflimb and one with nmod_mul, rather than testing it at each product.
Guides#
Cite this page
The FLINT team, “_nmod_mul_halflimb (nmod.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/nmod/_nmod_mul_halflimb.html (generated 2026-11-20).
@misc{flint-doc-nmod-nmod-mul-halflimb,
author = {{The FLINT team}},
title = {{\_nmod\_mul\_halflimb (nmod.h)}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/nmod/_nmod_mul_halflimb.html},
note = {Generated 2026-11-20}
}