Math Vector Library
Programming Reference Manual C/C++
Version 1.0 DD-00002-010

11.3 vsub - Vector subtraction x-y

#include <mvec.h>

void vsub (int n, double *z, int incz, const double *x, int incx, const double *y, int incy);
void vsubf(int n, float *z, int incz, const float *x, int incx, const float *y, int incy);

Given input vectors x  and y  and a result vector z  , this function computes

z= x-y

11.3.1 Parameters

N - INTEGER

ENTRY: Number of elements of x  , y  and z  .
CONSTRAINT: n ≥1  .

Z - ARRAY OF REAL

EXIT: Result vector z  .
CONSTRAINT: Must contain n× incz  elements.
CONSTRAINT: Must not overlap with array x  or y  .

INCZ - INTEGER

ENTRY: Stride for the vector z  .
CONSTRAINT: incz> 0  .

X - ARRAY OF REAL

ENTRY: Input vector x  .
CONSTRAINT: Must contain n× incx  elements.
CONSTRAINT: Must not overlap with array z  or y  .

INCX - INTEGER

ENTRY: Stride for the vector x  .
CONSTRAINT: incx> 0  .

Y - ARRAY OF REAL

ENTRY: Input vector y  .
CONSTRAINT: Must contain n× incy  elements.
CONSTRAINT: Must not overlap with array z  or x  .

INCY - INTEGER

ENTRY: Stride for the vector y  .
CONSTRAINT: incy> 0  .