radix_lshift_digits, radix_rshift_digits
Synopsis
#include <flint/radix.h>ulong radix_lshift_digits(nn_ptr res, nn_srcptr a, slong n, unsigned int e, const radix_t radix)sourceulong radix_rshift_digits(nn_ptr res, nn_srcptr a, slong n, unsigned int e, const radix_t radix)sourceShift (a, n) by k = e digits, for 1 \le k less than the limb exponent: the left shift sets (\mathit{res}, n) to a b^k \bmod B^n and returns the k digits shifted out (as the low digits of the returned limb); the right shift sets (\mathit{res}, n) to \lfloor a / b^k \rfloor and returns the k digits shifted out as the high digits of the returned limb, that is, (a \bmod b^k) b^{e - k}. These are faster than radix_mul_1 and radix_divrem_1 with b^k. Shifts by whole limbs are pointer offsets.
Cite this page
The FLINT team, “radix_lshift_digits, radix_rshift_digits (radix.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/radix/radix_lshift_digits.html (generated 2026-10-20).
@misc{flint-doc-radix-radix-lshift-digits,
author = {{The FLINT team}},
title = {{radix\_lshift\_digits, radix\_rshift\_digits (radix.h)}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/radix/radix_lshift_digits.html},
note = {Generated 2026-10-20}
}