FLINT3.7.0-dev

arf_add, arf_add_si, arf_add_ui, arf_add_fmpz

Synopsis#include <flint/arf.h>
int arf_add(arf_ptr z, arf_srcptr x, arf_srcptr y, slong prec, arf_rnd_t rnd)source
int arf_add_si(arf_ptr z, arf_srcptr x, slong y, slong prec, arf_rnd_t rnd)source
int arf_add_ui(arf_ptr z, arf_srcptr x, ulong y, slong prec, arf_rnd_t rnd)source
int arf_add_fmpz(arf_ptr z, arf_srcptr x, const fmpz_t y, slong prec, arf_rnd_t rnd)source

Set z to x + y, correctly rounded.

The cost depends on the precision and not on the distance between the exponents: when y is far below the last bit of x at precision prec, only its sign and position matter for the rounding.

Guides#

Cite this page

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