FLINT3.7.0-dev

dfloat_set_dfloat, dfloat_ball_set_ball

Synopsis#include <flint/dfloat.h>
void dfloat_set_dfloat(double * res, int nres, const double * x, int nx)source
void dfloat_ball_set_ball(double * res, int nres, const double * x, int nx)source

Convert the nx-term expansion x to nres terms. Converting to a longer format is exact; converting to a shorter one rounds, and for balls the dropped part is added to the radius. In the ball version the radius is stored after the midpoint, at x[nx] and res[nres], and a result whose magnitude overflows becomes the whole real line. Requires 1 \le nx, nres \le 4.

Cite this page

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