# Sub

Performs element by element subtraction of vector b from vector a.

## Syntax

Fortran:

call vssub( n, a, b, y )

call vdsub( n, a, b, y )

call vcsub( n, a, b, y )

call vzsub( n, a, b, y )

C:

vsSub( n, a, b, y );

vdSub( n, a, b, y );

vcSub( n, a, b, y );

vzSub( n, a, b, y );

## Input Parameters

Name | Type | Description
--- | --- | ---
n | FORTRAN: INTEGER, INTENT(IN) C: int | Specifies the number of elements to be calculated.
a, b | FORTRAN: REAL, INTENT(IN) for vssub DOUBLE PRECISION, INTENT(IN) for vdsub COMPLEX, INTENT(IN) for vcsub DOUBLE COMPLEX, INTENT(IN) for vzsub C: const float* for vsSub const double* for vdSub const MKL_Complex8* for vcSub const MKL_Complex16* for vzSub | FORTRAN: Arrays, specify the input vectors a and b. C: Pointers to arrays that contain the input vectors a and b.

## Output Parameters

Name | Type | Description
--- | --- | ---
y | FORTRAN: REAL for vssub DOUBLE PRECISION for vdsub COMPLEX, for vcsub DOUBLE COMPLEX for vzsub C: float* for vsSub double* for vdSub MKL_Complex8* for vcSub MKL_Complex16* for vzSub | FORTRAN: Array, specifies the output vector y. C: Pointer to an array that contains the output vector y.

Parent topic: Arithmetic Functions