FLINT3.7.0-dev

_decfloat_round_with_tail

Synopsis#include <flint/decimal.h>
int _decfloat_round_with_tail(decfloat_t res, const decfloat_t S, int tail_sign, slong tail_exp, slong prec, int rnd, gr_ctx_t ctx)source

Round S+tS + t to prec digits, where SS is an exact nonzero finite decfloat and tt a nonzero real number of sign tail_sign with ∣t∣<10tail_exp|t| < 10^{\mathit{tail\_exp}}. Return 1 if tail_exp lies at least prec +4e+ 4e digits below the leading digit of SS, so that tt only acts as a sticky bit; 0 if this precondition fails, and −1-1 on an error (exponent limits). This implements the handling of tiny arguments of the elementary and special functions.

Cite this page

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