FLINT3.7.0-dev

_nfloat_vec_dot, _nfloat_vec_dot_rev

Synopsis#include <flint/nfloat.h>
int _nfloat_vec_dot(nfloat_ptr res, nfloat_srcptr initial, int subtract, nfloat_srcptr x, nfloat_srcptr y, slong len, gr_ctx_t ctx)source
int _nfloat_vec_dot_rev(nfloat_ptr res, nfloat_srcptr initial, int subtract, nfloat_srcptr x, nfloat_srcptr y, slong len, gr_ctx_t ctx)source

Set res to s \pm \sum_{i} x_i y_i (or with y reversed), where s is initial (zero if NULL) and the sign is negative if subtract is nonzero. The sum is accumulated in fixed point with one guard word after a pass that finds the largest exponent, so the result has an error of a few ulps relative to the largest term rather than one rounding per term; with directed rounding it is a valid bound. See Dot products.

Guides#

Cite this page

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