_decfloat_set_round_fmpz_2exp_err, _decfloat_set_round_fmpz_2exp_scaled, _decfloat_set_exact_decimal_fmpz_2exp, _decfloat_set_round_arf_small, _decfloat_maybe_dyadic
#include <flint/decimal.h>int _decfloat_set_round_fmpz_2exp_err(decfloat_t res, const fmpz_t m, const fmpz_t t, slong prec, int rnd, decimal_rounding_info * info, decmag_ptr err, gr_ctx_t ctx)sourceint _decfloat_set_round_fmpz_2exp_scaled(decfloat_t res, const fmpz_t m, slong t, slong prec, int rnd, decimal_rounding_info * info, decmag_ptr err, gr_ctx_t ctx)sourceint _decfloat_set_exact_decimal_fmpz_2exp(decfloat_t res, const fmpz_t m, const fmpz_t t, slong prec, gr_ctx_t ctx)sourceint _decfloat_set_round_arf_small(decfloat_t res, const arf_t x, slong prec, int rnd, decimal_rounding_info * info, gr_ctx_t ctx)sourceint _decfloat_maybe_dyadic(const decfloat_t x, gr_ctx_t ctx)sourceThe binary-to-decimal conversion of m 2^t: correctly rounded with an optional error bound; by exact integer arithmetic on a scaled truncation when the sizes are moderate (returning 0 when they are too large, so that the caller uses arb); setting res to m 2^t and returning 1 when it is exactly representable with at most prec digits; and a fast path for a short arf with a moderate exponent. _decfloat_maybe_dyadic is a cheap necessary condition for x to be a dyadic rational.
The FLINT team, “_decfloat_set_round_fmpz_2exp_err, _decfloat_set_round_fmpz_2exp_scaled, _decfloat_set_exact_decimal_fmpz_2exp, _decfloat_set_round_arf_small, _decfloat_maybe_dyadic (decimal.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/decimal/_decfloat_set_round_fmpz_2exp_err.html (generated 2026-10-20).
@misc{flint-doc-decimal-decfloat-set-round-fmpz-2exp-err,
author = {{The FLINT team}},
title = {{\_decfloat\_set\_round\_fmpz\_2exp\_err, \_decfloat\_set\_round\_fmpz\_2exp\_scaled, \_decfloat\_set\_exact\_decimal\_fmpz\_2exp, \_decfloat\_set\_round\_arf\_small, \_decfloat\_maybe\_dyadic (decimal.h)}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/decimal/_decfloat_set_round_fmpz_2exp_err.html},
note = {Generated 2026-10-20}
}