_d_vec_dot_thrice
#include <flint/d_vec.h>Returns the dot product computed as if in three times the working precision and then rounded to double, using error-free transformations (the algorithm Dot3 of Ogita, Rump and Oishi [ORO2005]). The result is accurate to nearly full double precision unless the dot product is extremely ill-conditioned. If err is not NULL, sets *err to the error bound of [ORO2005] in terms of the returned value , evaluated in double precision: with and .
Each product is split into exactly by Dekker's product with Veltkamp splitting (the code does not use FMA), the sum of the is accumulated with Knuth's TwoSum, keeping the rounding errors, and the resulting terms are summed again with a cascade of TwoSums followed by an ordinary sum of the errors; see Error-free transformations for the error-free transformations. The products must not overflow, and products below about lose the exactness of the splitting. A temporary vector of doubles is allocated.
References#
- [ORO2005] T. Ogita, S. M. Rump and S. Oishi. Accurate sum and dot product. SIAM Journal on Scientific Computing 26:6 (2005), 1955–1988. https://doi.org/10.1137/030601818
The FLINT team, “_d_vec_dot_thrice (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_thrice.html (generated 2026-11-02).
@misc{flint-doc-d-vec-d-vec-dot-thrice,
author = {{The FLINT team}},
title = {{\_d\_vec\_dot\_thrice (d\_vec.h)}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/d_vec/_d_vec_dot_thrice.html},
note = {Generated 2026-11-02}
}