FLINT3.7.0-dev

decfloat_init, decfloat_clear, decfloat_swap, decfloat_set_shallow

Synopsis#include <flint/decimal.h>
void decfloat_init(decfloat_t res, gr_ctx_t ctx)source
void decfloat_clear(decfloat_t res, gr_ctx_t ctx)source
void decfloat_swap(decfloat_t x, decfloat_t y, gr_ctx_t ctx)source
void decfloat_set_shallow(decfloat_t res, const decfloat_t x, gr_ctx_t ctx)source

Memory management. decfloat_init sets res to zero without allocating; decfloat_set_shallow copies the structure without copying the mantissa, so that only one of the two may be cleared.

Guides#

Cite this page

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