FLINT3.7.0-dev

flint_mpn_fmms1

Synopsis#include <flint/mpn_extras.h>
mp_size_t flint_mpn_fmms1(mp_ptr y, mp_limb_t a1, mp_srcptr x1, mp_limb_t a2, mp_srcptr x2, mp_size_t n)source

Tries to compute y=a1x1−a2x2y = a_1 x_1 - a_2 x_2, where x1x_1 and x2x_2 have n≥1n \ge 1 limbs (not necessarily normalised). If the result is nonnegative and fits in nn limbs, it is written to (y,n)(y, n) and its normalised length is returned; otherwise −1-1 is returned and (y,n)(y, n) holds garbage. yy may alias x1x_1 but not x2x_2.

Cite this page

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