# Div

Performs element by element division of vector a by vector b

## Syntax

Fortran:

call vsdiv( n, a, b, y )

call vddiv( n, a, b, y )

call vcdiv( n, a, b, y )

call vzdiv( n, a, b, y )

C:

vsDiv( n, a, b, y );

vdDiv( n, a, b, y );

vcDiv( n, a, b, y );

vzDiv( 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 vsdiv DOUBLE PRECISION, INTENT(IN) for vddiv COMPLEX, INTENT(IN) for vcdiv DOUBLE COMPLEX, INTENT(IN) for vzdiv C: const float* for vsDiv const double* for vdDiv const MKL_Complex8* for vcDiv const MKL_Complex16* for vzDiv | FORTRAN: Arrays, specify the input vectors a and b. C: Pointers to arrays that contain the input vectors a and b.

Precision Overflow Thresholds for Div Real 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`

### Note

Overflow can occur also in Div complex function, but the exact formula is beyond the scope of this document.

## Output Parameters

Name | Type | Description
--- | --- | ---
y | FORTRAN: REAL for vsdiv DOUBLE PRECISION for vddiv COMPLEX for vcdiv DOUBLE COMPLEX for vzdiv C: float* for vsDiv double* for vdDiv MKL_Complex8* for vcDiv MKL_Complex16* for vzDiv | FORTRAN: Array, specifies the output vector y. C: Pointer to an array that contains the output vector y.

Parent topic: Power and Root Functions