gr_transformed_mpn_get_trunc, gr_transformed_mpn_get_trunc_destructive, gr_transformed_mpn_get_limbs_trunc
#include <flint/gr.h>int gr_transformed_mpn_get_trunc(nn_ptr z, slong zn, slong * zn_out, int * sign, slong lo, gr_srcptr x, gr_ctx_t ctx)sourceint gr_transformed_mpn_get_trunc_destructive(nn_ptr z, slong zn, slong * zn_out, int * sign, slong lo, gr_ptr x, gr_ctx_t ctx)sourceTruncated conversion out: the limbs of the value starting at limb lo, with an error against the exact value within (-1.5, +0.5) units of the lowest returned limb, equivalently at most 1 from the floor of the truncated value. The export includes every CRT slot whose coefficient span can reach the first returned limb, with carries propagated, so the error is the truncation itself (one-sided, below one unit) plus the total of the wholly dropped slots (under half a unit either way). gr_transformed_mpn_get_limbs_trunc returns the number of limbs needed.
The FLINT team, “gr_transformed_mpn_get_trunc, gr_transformed_mpn_get_trunc_destructive, gr_transformed_mpn_get_limbs_trunc (gr.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/gr/gr_transformed_mpn_get_trunc.html (generated 2026-10-20).
@misc{flint-doc-gr-gr-transformed-mpn-get-trunc,
author = {{The FLINT team}},
title = {{gr\_transformed\_mpn\_get\_trunc, gr\_transformed\_mpn\_get\_trunc\_destructive, gr\_transformed\_mpn\_get\_limbs\_trunc (gr.h)}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/gr/gr_transformed_mpn_get_trunc.html},
note = {Generated 2026-10-20}
}