nfloat_1_set_2_2exp, nfloat_1_set_3_2exp, nfloat_2_set_3_2exp, nfloat_2_set_4_2exp
Synopsis
#include <flint/nfloat.h>int nfloat_1_set_2_2exp(nfloat_ptr res, ulong x1, ulong x0, slong exp, int xsgnbit, gr_ctx_t ctx)sourceint nfloat_1_set_3_2exp(nfloat_ptr res, ulong x2, ulong x1, ulong x0, slong exp, int xsgnbit, gr_ctx_t ctx)sourceint nfloat_2_set_3_2exp(nfloat_ptr res, ulong x2, ulong x1, ulong x0, slong exp, int xsgnbit, gr_ctx_t ctx)sourceint nfloat_2_set_4_2exp(nfloat_ptr res, ulong x3, ulong x2, ulong x1, ulong x0, slong exp, int xsgnbit, gr_ctx_t ctx)sourceInline versions of nfloat_set_mpn_2exp for a two-, three- or four-word fraction (most significant word first in the argument list) and a context of exactly one word (nfloat_1_) or two words (nfloat_2_). The fraction is normalised and truncated (not rounded) to the precision; zero, underflow and overflow are handled as by the other functions.
Cite this page
The FLINT team, “nfloat_1_set_2_2exp, nfloat_1_set_3_2exp, nfloat_2_set_3_2exp, nfloat_2_set_4_2exp (nfloat.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/nfloat/nfloat_1_set_2_2exp.html (generated 2026-10-20).
@misc{flint-doc-nfloat-nfloat-1-set-2-2exp,
author = {{The FLINT team}},
title = {{nfloat\_1\_set\_2\_2exp, nfloat\_1\_set\_3\_2exp, nfloat\_2\_set\_3\_2exp, nfloat\_2\_set\_4\_2exp (nfloat.h)}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/nfloat/nfloat_1_set_2_2exp.html},
note = {Generated 2026-10-20}
}