Intel® Math Kernel Library 2019 Developer Reference - Fortran
Performs element by element multiplication of vector a and vector b.
call vsmul( n, a, b, y )
call vmsmul( n, a, b, y, mode )
call vdmul( n, a, b, y )
call vmdmul( n, a, b, y, mode )
call vcmul( n, a, b, y )
call vmcmul( n, a, b, y, mode )
call vzmul( n, a, b, y )
call vmzmul( n, a, b, y, mode )
Name |
Type |
Description |
|---|---|---|
n |
INTEGER, INTENT(IN) |
Specifies the number of elements to be calculated. |
a, b |
DOUBLE PRECISION for vdmul, vmdmul COMPLEX for vcmul, vmcmul DOUBLE COMPLEX for vzmul, vmzmul REAL, INTENT(IN) for vsmul, vmsmul DOUBLE PRECISION, INTENT(IN) for vdmul, vmdmul COMPLEX, INTENT(IN) for vcmul, vmcmul DOUBLE COMPLEX, INTENT(IN) for vzmul, vmzmul |
Arrays that specify the input vectors a and b. |
mode |
INTEGER(KIND=8), INTENT(IN) |
Overrides global VM mode setting for this function call. See vmlSetMode for possible values and their description. |
Name |
Type |
Description |
|---|---|---|
y |
DOUBLE PRECISION for vdmul, vmdmul COMPLEX, for vcmul, vmcmul DOUBLE COMPLEX for vzmul, vmzmul REAL, INTENT(OUT) for vsmul, vmsmul DOUBLE PRECISION, INTENT(OUT) for vdmul, vmdmul COMPLEX, INTENT(OUT) for vcmul, vmcmul DOUBLE COMPLEX, INTENT(OUT) for vzmul, vmzmul |
Array that specifies the output vector y. |
The v?Mul function performs element by element multiplication of vector a and vector b.
| Argument 1 | Argument 2 | Result | Exception |
|---|---|---|---|
| +0 | +0 | +0 | |
| +0 | -0 | -0 | |
| -0 | +0 | -0 | |
| -0 | -0 | +0 | |
| +0 | +∞ | QNAN | INVALID |
| +0 | -∞ | QNAN | INVALID |
| -0 | +∞ | QNAN | INVALID |
| -0 | -∞ | QNAN | INVALID |
| +∞ | +0 | QNAN | INVALID |
| +∞ | -0 | QNAN | INVALID |
| -∞ | +0 | QNAN | INVALID |
| -∞ | -0 | 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
Mul(x1+i*y1,x2+i*y2) = (x1*x2-y1*y2) + i*(x1*y2+y1*x2).
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 computed 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 VM Error Status to VML_STATUS_OVERFLOW (overriding any possible VML_STATUS_ACCURACYWARNING status).