FLINT3.7.0-dev

_decmag_set_ulp

Synopsis#include <flint/decimal.h>
void _decmag_set_ulp(decmag_t res, const decfloat_t x, slong prec, gr_ctx_t ctx)source

Sets res to 10^{E - \mathrm{prec} + 1} where E is the scientific exponent of x, i.e. the unit in the last place of x rounded to prec digits. Requires x to be nonzero and finite.

Cite this page

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