FLINT3.7.0-dev

radix_add, radix_sub

Synopsis#include <flint/radix.h>
ulong radix_add(nn_ptr res, nn_srcptr a, slong an, nn_srcptr b, slong bn, const radix_t radix)source
ulong radix_sub(nn_ptr res, nn_srcptr a, slong an, nn_srcptr b, slong bn, const radix_t radix)source

Set (\mathit{res}, \mathit{an}) to a + b, respectively a - b, modulo B^{an} and return the carry, respectively the borrow (0 or 1). Requires \mathit{an} \ge \mathit{bn} \ge 1.

Cite this page

The FLINT team, “radix_add, radix_sub (radix.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/radix/radix_add.html (generated 2026-10-20).