FLINT3.7.0-dev

_decfloat_set_scalar_exact, _decfloat_set_str_literal, _decfloat_set_decfloat_other, _decball_set_decfloat_other, _decball_set_decball_other

Synopsis#include <flint/decimal.h>
int _decfloat_set_scalar_exact(decfloat_t res, const void * y, int type, gr_ctx_t ctx)source
int _decfloat_set_str_literal(decfloat_t res, const char * s, slong prec, int rnd, gr_ctx_t ctx)source
int _decfloat_set_decfloat_other(decfloat_t res, const decfloat_t y, gr_ctx_t x_ctx, gr_ctx_t ctx)source
int _decball_set_decfloat_other(decball_t res, const decfloat_t x, gr_ctx_t x_ctx, gr_ctx_t ctx)source
int _decball_set_decball_other(decball_t res, const decball_t y, gr_ctx_t x_ctx, gr_ctx_t ctx)source

Exact conversion of the scalar *y of type DECIMAL_SCALAR_UI, DECIMAL_SCALAR_SI, DECIMAL_SCALAR_FMPZ or DECIMAL_SCALAR_D (without rounding or exponent limits); parsing of a plain decimal literal with rounding to prec digits, returning GR_DOMAIN if s is not a literal (no expression parsing); and conversion from an element of a decimal context x_ctx with a possibly different limb radix.

Cite this page

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