FLINT3.7.0-dev

mp_real_addmul_ui, mp_real_submul_ui

Synopsis#include <flint/mp_real.h>
void mp_real_addmul_ui(mp_real_t res, const mp_real_t x, const mp_real_t y, ulong c, slong n)source
void mp_real_submul_ui(mp_real_t res, const mp_real_t x, const mp_real_t y, ulong c, slong n)source

Set res to x + yc resp. x - yc for a word c.

In place (res aliasing x) and with yc inside the window of x (and, for a difference, unable to flip its sign), this is one mpn_addmul_1 resp. mpn_submul_1 over the limbs of y, independent of the length of x; y may reach below an inexact x, the tail entering the radius. These are the primitives for summing many terms with word coefficients into one accumulator, as in rectangular splitting. Other shapes form yc and add it.

Guides#

Cite this page

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