FLINT3.7.0-dev

_d_vec_dot_heuristic

Synopsis#include <flint/d_vec.h>
double _d_vec_dot_heuristic(const double * vec1, const double * vec2, slong len2, double * err)source

Returns the dot product computed by summing the nonnegative and the negative products separately and subtracting the two sums at the end. If err is not NULL, sets *err to 2 n \max(2^{e_p - 53}, 2^{e_q - 53}), where 2^{e_p} and 2^{e_q} bound the two partial sums and n is the length. This is an estimate of the error, not a rigorous bound: it does not account for overflow or underflow, and the factor 2n is heuristic for long vectors.

Cite this page

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