FLINT3.7.0-dev

ca_dot

Synopsis#include <flint/ca.h>
void ca_dot(ca_t res, const ca_t initial, int subtract, ca_srcptr x, slong xstep, ca_srcptr y, slong ystep, slong len, ca_ctx_t ctx)source

Sets res to s + (-1)^{\mathit{subtract}} \sum_{i=0}^{\mathit{len}-1} x_{i \cdot \mathit{xstep}} \, y_{i \cdot \mathit{ystep}}.

The initial value s is initial, or 0 if initial is NULL. subtract must be 0 or 1. A nonpositive len gives s. The steps may be negative, to traverse arrays backwards from the given pointers. The output may be the same object as initial but must not be an entry of x or y. The products are accumulated one at a time with ca_mul and ca_add.

Cite this page

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