_arf_set_mpn_canonical, _arf_set_mpn_canonical_copy
#include <flint/arf.h>Set the mantissa of z from the n normalised limbs a kernel wrote at the start of its buffer (allocated with ARF_GET_MPN_WRITE for at least n limbs), respectively from the limbs d in scratch: zero low limbs are stripped and a result of two or fewer limbs moves into the inline limbs, so that z is in canonical form. The exponent is left for the caller. ARF_KERNEL_DECL, ARF_KERNEL_ALLOC(zd, alloc, z, x, y) and ARF_KERNEL_FINISH(z, zd, n, sgnbit) wrap the buffer management for a kernel writing alloc limbs into z: the buffer of z itself, unless z is one of the operands x, y or the result may be short enough for the inline limbs, in which case the kernel works in scratch and the result is copied.
The FLINT team, “_arf_set_mpn_canonical, _arf_set_mpn_canonical_copy (arf.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/arf/_arf_set_mpn_canonical.html (generated 2026-11-20).
@misc{flint-doc-arf-arf-set-mpn-canonical,
author = {{The FLINT team}},
title = {{\_arf\_set\_mpn\_canonical, \_arf\_set\_mpn\_canonical\_copy (arf.h)}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/arf/_arf_set_mpn_canonical.html},
note = {Generated 2026-11-20}
}