FLINT3.7.0-dev

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)source
int nfloat_1_set_3_2exp(nfloat_ptr res, ulong x2, ulong x1, ulong x0, slong exp, int xsgnbit, gr_ctx_t ctx)source
int nfloat_2_set_3_2exp(nfloat_ptr res, ulong x2, ulong x1, ulong x0, slong exp, int xsgnbit, gr_ctx_t ctx)source
int nfloat_2_set_4_2exp(nfloat_ptr res, ulong x3, ulong x2, ulong x1, ulong x0, slong exp, int xsgnbit, gr_ctx_t ctx)source

Inline 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).