nmod_redc_half_set_nmod, nmod_redc_half_set_ui, nmod_redc_half_get_nmod
Synopsis
#include <flint/nmod.h>ulong nmod_redc_half_set_nmod(ulong x, const nmod_redc_ctx_t ctx)sourceulong nmod_redc_half_set_ui(ulong x, const nmod_redc_ctx_t ctx)sourceulong nmod_redc_half_get_nmod(ulong x, const nmod_redc_ctx_t ctx)sourceConvert to and from Montgomery form with R = 2^{\mathtt{FLINT\_BITS}/2}. nmod_redc_half_set_nmod requires x < n and nmod_redc_half_set_ui accepts any x. nmod_redc_half_get_nmod returns a value in [0, n) for any x < nR, in particular for lazy residues.
Guides#
Cite this page
The FLINT team, “nmod_redc_half_set_nmod, nmod_redc_half_set_ui, nmod_redc_half_get_nmod (nmod.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/nmod/nmod_redc_half_set_nmod.html (generated 2026-10-20).
@misc{flint-doc-nmod-nmod-redc-half-set-nmod,
author = {{The FLINT team}},
title = {{nmod\_redc\_half\_set\_nmod, nmod\_redc\_half\_set\_ui, nmod\_redc\_half\_get\_nmod (nmod.h)}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/nmod/nmod_redc_half_set_nmod.html},
note = {Generated 2026-10-20}
}