decfloat_init, decfloat_clear, decfloat_swap, decfloat_set_shallow
Synopsis
#include <flint/decimal.h>void decfloat_init(decfloat_t res, gr_ctx_t ctx)sourcevoid decfloat_clear(decfloat_t res, gr_ctx_t ctx)sourcevoid decfloat_swap(decfloat_t x, decfloat_t y, gr_ctx_t ctx)sourcevoid decfloat_set_shallow(decfloat_t res, const decfloat_t x, gr_ctx_t ctx)sourceMemory 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).
@misc{flint-doc-decimal-decfloat-init,
author = {{The FLINT team}},
title = {{decfloat\_init, decfloat\_clear, decfloat\_swap, decfloat\_set\_shallow (decimal.h)}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/decimal/decfloat_init.html},
note = {Generated 2026-10-20}
}