flint_mpq_init_set_readonly, flint_mpq_clear_readonly
Synopsis
#include <flint/fmpq.h>void flint_mpq_clear_readonly(mpq_t z)sourceMake the uninitialised mpq_t z a read-only view of f, without copying large components, and release it. f must not change while z is in use, and z must not be modified. Declared only if gmp.h is included before any FLINT header.
The intended use is to pass an fmpq_t to a function that takes an mpq_t argument:
fmpq_t f;
...
{
mpq_t z;
flint_mpq_init_set_readonly(z, f);
foo(..., z);
flint_mpq_clear_readonly(z);
}Cite this page
The FLINT team, “flint_mpq_init_set_readonly, flint_mpq_clear_readonly (fmpq.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/fmpq/flint_mpq_init_set_readonly.html (generated 2026-10-20).
@misc{flint-doc-fmpq-flint-mpq-init-set-readonly,
author = {{The FLINT team}},
title = {{flint\_mpq\_init\_set\_readonly, flint\_mpq\_clear\_readonly (fmpq.h)}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/fmpq/flint_mpq_init_set_readonly.html},
note = {Generated 2026-10-20}
}