_addcarry_ulong, _subborrow_ulong
Synopsis
#include <flint/crt_helpers.h>Set *s to x + y + c (respectively x - y - c) modulo B for the carry (borrow) c \in \{0, 1\} and return the carry (borrow) out. With AVX2 on 64-bit machines these are the compiler intrinsics _addcarry_u64 and _subborrow_u64; otherwise they are written with the two-limb macros of longlong.h.
Cite this page
The FLINT team, “_addcarry_ulong, _subborrow_ulong (crt_helpers.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/crt_helpers/_addcarry_ulong.html (generated 2026-10-20).
@misc{flint-doc-crt-helpers-addcarry-ulong,
author = {{The FLINT team}},
title = {{\_addcarry\_ulong, \_subborrow\_ulong (crt\_helpers.h)}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/crt_helpers/_addcarry_ulong.html},
note = {Generated 2026-10-20}
}