FLINT3.7.0-dev

_fq_vec_dot

Synopsis#include <flint/fq_vec.h>
void _fq_vec_dot(fq_t res, const fq_struct * vec1, const fq_struct * vec2, slong len2, const fq_ctx_t ctx)source

Sets res to the dot product \sum_{i < \mathit{len2}} \mathit{vec1}_i \mathit{vec2}_i, which is zero for \mathit{len2} \le 0.

This is a wrapper of the generic _gr_vec_dot. The fq implementation accumulates the unreduced products of the representatives as one integer polynomial and reduces it once at the end, modulo p and modulo the defining polynomial, so a dot product costs about as much as \ell polynomial products and one reduction instead of \ell reductions. The fq_nmod version accumulates the products modulo p and also reduces modulo the defining polynomial once; the fq_zech version works with discrete logarithms and the Zech table (see fq_zech_vec.h).

Cite this page

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