Developer Reference for Intel® oneAPI Math Kernel Library for Fortran

ID 766686
Date 12/16/2022
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

v?Div

Performs element by element division of vector a by vector b

Syntax

call vsdiv( n, a, b, y )

call vsdivi(n, a, inca, b, incb, y, incy)

call vmsdiv( n, a, b, y, mode )

call vmsdivi(n, a, inca, b, incb, y, incy, mode)

call vddiv( n, a, b, y )

call vddivi(n, a, inca, b, incb, y, incy)

call vmddiv( n, a, b, y, mode )

call vmddivi(n, a, inca, b, incb, y, incy, mode)

call vcdiv( n, a, b, y )

call vcdivi(n, a, inca, b, incb, y, incy)

call vmcdiv( n, a, b, y, mode )

call vmcdivi(n, a, inca, b, incb, y, incy, mode)

call vzdiv( n, a, b, y )

call vzdivi(n, a, inca, b, incb, y, incy)

call vmzdiv( n, a, b, y, mode )

call vmzdivi(n, a, inca, b, incb, y, incy, mode)

Include Files
  • mkl_vml.f90
Input Parameters

Name

Type

Description

n

INTEGER, INTENT(IN)

Specifies the number of elements to be calculated.

a, b

DOUBLE PRECISION for vddiv, vmddiv

COMPLEX for vcdiv, vmcdiv

DOUBLE COMPLEX for vzdiv, vmzdiv

REAL, INTENT(IN) for vsdiv, vmsdiv

DOUBLE PRECISION, INTENT(IN) for vddiv, vmddiv

COMPLEX, INTENT(IN) for vcdiv, vmcdiv

DOUBLE COMPLEX, INTENT(IN) for vzdiv, vmzdiv

Arrays that specify the input vectors a and b.

inca, incb, incy

INTEGER, INTENT(IN)

Specifies increments for the elements of a, b, and y.

mode

INTEGER(KIND=8), INTENT(IN)

Overrides global VM mode setting for this function call. See vmlSetMode for possible values and their description.

Precision Overflow Thresholds for Real v?Div Function
Data Type Threshold Limitations on Input Parameters
single precision abs(a[i]) < abs(b[i]) * FLT_MAX
double precision abs(a[i]) < abs(b[i]) * DBL_MAX

Precision overflow thresholds for the complex v?Div function are beyond the scope of this document.

Output Parameters

Name

Type

Description

y

DOUBLE PRECISION for vddiv, vmddiv

COMPLEX for vcdiv, vmcdiv

DOUBLE COMPLEX for vzdiv, vmzdiv

REAL, INTENT(OUT) for vsdiv, vmsdiv

DOUBLE PRECISION, INTENT(OUT) for vddiv, vmddiv

COMPLEX, INTENT(OUT) for vcdiv, vmcdiv

DOUBLE COMPLEX, INTENT(OUT) for vzdiv, vmzdiv

Array that specifies the output vector y.

Description

The v?Div function performs element by element division of vector a by vector b.

Special values for Real Function v?Div(x)
Argument 1 Argument 2 Result VM Error Status Exception
X > +0 +0 + VML_STATUS_SING ZERODIVIDE
X > +0 -0 - VML_STATUS_SING ZERODIVIDE
X < +0 +0 - VML_STATUS_SING ZERODIVIDE
X < +0 -0 + VML_STATUS_SING ZERODIVIDE
+0 +0 QNAN VML_STATUS_SING  
-0 -0 QNAN VML_STATUS_SING  
X > +0 + +0    
X > +0 - -0    
+ + QNAN    
- - QNAN    
QNAN QNAN QNAN    
SNAN SNAN QNAN   INVALID

Specifications for special values of the complex functions are defined according to the following formula

Div(x1+i*y1,x2+i*y2) = (x1+i*y1)*(x2-i*y2)/(x2*x2+y2*y2).

Overflow in a complex function occurs when x2+i*y2 is not zero, 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 that case, the function returns in that part of the result, raises the OVERFLOW exception, and sets the VM Error Status to VML_STATUS_OVERFLOW.