FLINT3.7.0-dev

nfloat_get_d_2exp_si

Synopsis#include <flint/nfloat.h>
int nfloat_get_d_2exp_si(double * mant, slong * expo, nfloat_srcptr x, gr_ctx_t ctx)source

Sets mant and expo such that x \approx \mathit{mant} \cdot 2^{\mathit{expo}} with |\mathit{mant}| \in [1/2, 1) (or both zero for x = 0), from the leading word of the mantissa, so with a relative error of about 2^{-53}. This avoids the overflow of a direct conversion to double. Returns GR_UNABLE for infinities and NaN.

Cite this page

The FLINT team, “nfloat_get_d_2exp_si (nfloat.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/nfloat/nfloat_get_d_2exp_si.html (generated 2026-10-20).