fmpq_init_set_readonly, fmpq_clear_readonly
Synopsis
#include <flint/fmpq.h>Make the uninitialised fmpq_t f a read-only view of the mpq_t z, and release it. z must not change while f is in use, and f must not be modified. fmpq_init_set_readonly is declared only if gmp.h is included before any FLINT header.
The intended use is to call FLINT functions on GMP rationals:
mpq_t z;
...
{
fmpq_t f;
fmpq_init_set_readonly(f, z);
foo(..., f);
fmpq_clear_readonly(f);
}Cite this page
The FLINT team, “fmpq_init_set_readonly, fmpq_clear_readonly (fmpq.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/fmpq/fmpq_init_set_readonly.html (generated 2026-10-20).
@misc{flint-doc-fmpq-fmpq-init-set-readonly,
author = {{The FLINT team}},
title = {{fmpq\_init\_set\_readonly, fmpq\_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/fmpq_init_set_readonly.html},
note = {Generated 2026-10-20}
}