FLINT3.7.0-dev

arf_sum

Synopsis#include <flint/arf.h>
int arf_sum(arf_t s, arf_srcptr terms, slong len, slong prec, arf_rnd_t rnd)source

Sets s to the sum of the len entries of terms with a single rounding, and returns the inexact flag.

Unlike repeated calls to arf_add with ARF_PREC_EXACT, this does not build exact intermediate sums whose size depends on the spread of the exponents: terms that are far below the current precision are replaced by tiny perturbations that only affect the rounding. The implementation merges terms pairwise and takes quadratic time in len in the worst case.

Guides#

Cite this page

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