SYNOPSIS

#include "matrix.h" double in_prod(VEC *x, VEC *y)

#include "zmatrix.h" complex zin_prod(ZVEC *x, ZVEC *y)

DESCRIPTION

The inner product $x^Ty = \sum_i x_i y_i$ of `x` and `y` is
returned by `in_prod()`.
The complex inner product $\bar x^T y = \sum_i\bar x_i y_i$ of `x`
and `y` is returned by `zin_prod()`.
This will fail if `x` or `y` is NULL.
These are built on the ``raw'' inner product routines:

double _in_prod (VEC *x, VEC *y, int i0) complex _zin_prod(ZVEC *x, ZVEC *y, int i0, int conj)which compute the inner products ignoring the first

EXAMPLE

VEC *x, *y; ZVEC *zx, *zy; Real x_dot_y; complex zx_do_zy; ...... x_dot_y = in_prod(x,y); zx_dot_zy = zin_prod(zx,zy);

SEE ALSO:
`__ip__()`, `__zip__()` and the core routines.

BUGS

The accumulation is not guaranteed to be done in a higher precision
than `Real`, although the return type is `double`.
To guarantee more than this, we would either need an explicit extended
precision `long double` type or force the accumulation to be done in a
single register.
While this is in principle possible on IEEE standard hardware, the routines
to ensure this are not standard, even for IEEE arithmetic.

SOURCE FILE: `vecop.c, zvecop.c`