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 (res,an)(\mathit{res}, \mathit{an}) to a+ba + b, respectively a−ba - b, modulo BanB^{an} and return the carry, respectively the borrow (0 or 1). Requires an≥bn≥1\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-11-02).