Math Vector Library
Programming Reference Manual C/C++
Version 1.1 DD-00002-011

14.2 vhypot - Vector euclidean distance √︁------
 x2 +y2

#include <mvec.h> 
 
void vhypot (int n, double *restrict z, int incz, const double *restrict x, 
             int incx, const double *restrict y, int incy); 
void vhypotf(int n, float *restrict z, int incz, const float *restrict x, 
             int incx, const float *restrict y, int incy); 
 
void vhypot_64 (long n, double *restrict z, long incz, const double *restrict x, 
                long incx, const double *restrict y, long incy); 
void vhypotf_64(long n, float *restrict z, long incz, const float *restrict x, 
                long incx, const float *restrict y, long incy);

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

   √︃ -2---2
z =  x + y

14.2.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  .
BEHAVIOR: A negative stride will traverse the array in reverse.

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  .
BEHAVIOR: A negative stride will traverse the array in reverse.

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  .
BEHAVIOR: A negative stride will traverse the array in reverse.