# Vector Operations¶

Vector operations are component-wise. When an operator operates on a vector, it operates independently on each component of the vector, in a component-wise fashion.

Example 1:

float64 v, u;

float f;

...

v = u + f;


The above example shows that v and u are vectors with length 64 and float type scalar components and for each i in range [0,63] i-th component of v is evaluated as sum of i-th component of v and f.

Example 2:

   char 256 v, u, w;

...

w = v + u;


The above example shows that v and u are vectors with length 256 and char type scalar components and for each j in range [0,255] j-th component of v is evaluated as sum of j-th components of v and w respectively.

Note

This is correct for most operators, all integer and floating-point vector types.