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+ycx + yc resp. x−ycx - yc for a word cc.

In place (res aliasing xx) and with ycyc inside the window of xx (and, for a difference, unable to flip its sign), this is one mpn_addmul_1 resp. mpn_submul_1 over the limbs of yy, independent of the length of xx; yy may reach below an inexact xx, 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 ycyc 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-11-02).