Performs element by element subtraction of vector b from vector a.
FORTRAN:
call vssub( n, a, b, y )
call vmssub( n, a, b, y, mode )
call vdsub( n, a, b, y )
call vmdsub( n, a, b, y, mode )
call vcsub( n, a, b, y )
call vmcsub( n, a, b, y, mode )
call vzsub( n, a, b, y )
call vmzsub( n, a, b, y, mode )
C:
vsSub( n, a, b, y );
vmsSub( n, a, b, y, mode );
vdSub( n, a, b, y );
vmdSub( n, a, b, y, mode );
vcSub( n, a, b, y );
vmcSub( n, a, b, y, mode );
vzSub( n, a, b, y );
vmzSub( n, a, b, y, mode );
Name |
Type |
Description |
---|---|---|
n |
FORTRAN 77: INTEGER Fortran 90: INTEGER, INTENT(IN) C: const int |
Specifies the number of elements to be calculated. |
a, b |
FORTRAN 77: REAL for vssub, vmssub DOUBLE PRECISION for vdsub, vmdsub COMPLEX for vcsub, vmcsub DOUBLE COMPLEX for vzsub, vmzsub Fortran 90: REAL, INTENT(IN) for vssub, vmssub DOUBLE PRECISION, INTENT(IN) for vdsub, vmdsub COMPLEX, INTENT(IN) for vcsub, vmcsub DOUBLE COMPLEX, INTENT(IN) for vzsub, vmzsub C: const float* for vsSub, vmssub const double* for vdSub, vmdsub const MKL_Complex8* for vcSub, vmcsub const MKL_Complex16* for vzSub, vmzsub |
FORTRAN: Arrays that specify the input vectors a and b. C: Pointers to arrays that contain the input vectors a and b. |
mode |
FORTRAN 77: INTEGER*8 Fortran 90: INTEGER(KIND=8), INTENT(IN) C: const MKL_INT64 |
Overrides global VML mode setting for this function call. See vmlSetMode for possible values and their description. |
Name |
Type |
Description |
---|---|---|
y |
FORTRAN 77: REAL for vssub, vmssub DOUBLE PRECISION for vdsub, vmdsub COMPLEX for vcsub, vmcsub DOUBLE COMPLEX for vzsub, vmzsub Fortran 90: REALINTENT(OUT) for vssub, vmssub DOUBLE PRECISION, INTENT(OUT) for vdsub, vmdsub COMPLEX, INTENT(OUT) for vcsub, vmcsub DOUBLE COMPLEX, INTENT(OUT) for vzsub, vmzsub C: float* for vsSub, vmssub double* for vdSub, vmdsub MKL_Complex8* for vcSub, vmcsub MKL_Complex16* for vzSub, vmzsub |
FORTRAN: Array that specifies the output vector y. C: Pointer to an array that contains the output vector y. |
The v?Sub function performs element by element subtraction of vector b from vector a.
Argument 1 | Argument 2 | Result | Exception |
---|---|---|---|
+0 | +0 | +0 | |
+0 | -0 | +0 | |
-0 | +0 | -0 | |
-0 | -0 | +0 | |
+∞ | +∞ | QNAN | INVALID |
+∞ | -∞ | +∞ | |
-∞ | +∞ | -∞ | |
-∞ | -∞ | QNAN | INVALID |
SNAN | any value | QNAN | INVALID |
any value | SNAN | QNAN | INVALID |
QNAN | non-SNAN | QNAN | |
non-SNAN | QNAN | QNAN |
Specifications for special values of the complex functions are defined according to the following formula
Sub(x1+i*y1,x2+i*y2) = (x1-x2) + i*(y1-y2).
Overflow in a complex function occurs (supported in the HA/LA accuracy modes only) when x1, x2, y1, y2 are finite numbers, but the real or imaginary part of the exact result is so large that it does not fit the target precision. In this case, the function returns ∞ in that part of the result, raises the OVERFLOW exception, and sets the VML Error Status to VML_STATUS_OVERFLOW.