FLINT3.7.0-dev

arf_fma

Synopsis#include <flint/arf.h>
int arf_fma(arf_ptr res, arf_srcptr x, arf_srcptr y, arf_srcptr z, slong prec, arf_rnd_t rnd)source

Sets res to xy+zxy + z with a single rounding.

arf_addmul, arf_submul and arf_fma share one core: the exact product and one exact addition, rounded once. From 24 limbs of precision and of each factor, the product is truncated instead (flint_mpn_mulhigh: its top limbs above the rounding point with two guard limbs, a lower bound of the product within a known number of units of the lowest limb), the exact sum of z and that bound is formed, and it is rounded when its bits between the rounding point and the error band certify the rounding (_arf_rounding_certain); the exact product decides otherwise.

Cite this page

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