Developer Reference for Intel® oneAPI Math Kernel Library for Fortran
v?LinearFrac
vsLinearFrac vdLinearFrac vcLinearFrac vzLinearFrac Performs linear fraction transformation of vectors a and b with scalar parameters.
Syntax
call vslinearfrac ( n , a , b , scalea , shifta , scaleb , shiftb , y )
call vslinearfraci(n, a, inca, b, incb, scalea, shifta, scaleb, shiftb, y, incy)
call vmslinearfrac ( n , a , b , scalea , shifta , scaleb , shiftb , y , mode )
call vmslinearfraci(n, a, inca, b, incb, scalea, shifta, scaleb, shiftb, y, incy, mode)
call vdlinearfrac ( n , a , b , scalea , shifta , scaleb , shiftb , y )
call vdlinearfraci(n, a, inca, b, incb, scalea, shifta, scaleb, shiftb, y, incy)
call vmdlinearfrac ( n , a , b , scalea , shifta , scaleb , shiftb , y , mode )
call vmdlinearfraci(n, a, inca, b, incb, scalea, shifta, scaleb, shiftb, 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 |
Fortran 77: DOUBLE PRECISION for vdlinearfrac , vmdlinearfracFortran 90: REAL , INTENT(IN) for vslinearfrac , vmslinearfracFortran 90: DOUBLE PRECISION , INTENT(IN) for vdlinearfrac , vmdlinearfrac |
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 . |
scalea , scaleb |
Fortran 77: DOUBLE PRECISION for vdlinearfrac , vmdlinearfracFortran 90: REAL , INTENT(IN) for vslinearfrac , vmslinearfracFortran 90: DOUBLE PRECISION , INTENT(IN) for vdlinearfrac , vmdlinearfrac |
Constant values for scaling multipliers of vectors a and b . |
shifta , shiftb |
Fortran 77: DOUBLE PRECISION for vdlinearfrac , vmdlinearfracFortran 90: REAL , INTENT(IN) for vslinearfrac , vmslinearfracFortran 90: DOUBLE PRECISION , INTENT(IN) for vdlinearfrac , vmdlinearfrac |
Constant values for shifting addends of vectors a and b . |
mode |
INTEGER(KIND=8), INTENT(IN) |
Overrides global VM mode setting for this function call. See vmlSetMode (Sets a new mode for VM functions according to the mode parameter and stores the previous VM mode to oldmode.) for possible values and their description. |
Output Parameters
Name |
Type |
Description |
|---|---|---|
y |
Fortran 77: DOUBLE PRECISION for vdlinearfrac , vmdlinearfracFortran 90: REAL , INTENT(OUT) for vslinearfrac , vmslinearfracFortran 90: DOUBLE PRECISION , INTENT(OUT) for vdlinearfrac , vmdlinearfrac |
Array that specifies the output vector y . |
Description
The v?LinearFrac function performs a linear fraction transformation of vector a by vector b with scalar parameters: scaling multipliers scalea , scaleb and shifting addends shifta , shiftb :
y[i]=(scalea·a[i]+shifta)/(scaleb·b[i]+shiftb) , i =1,2 … n
The v?LinearFrac function is implemented in the EP accuracy mode only, therefore no special values are defined for this function. If used in HA or LA mode, v?LinearFrac sets the VM Error Status to VML_STATUS_ACCURACYWARNING (see the Values of the VM Status table). Correctness is guaranteed within the threshold limitations defined for each input parameter (see the table below); otherwise, the behavior is unspecified.
Threshold Limitations on Input Parameters |
|---|
2^{E_{MIN}/2}≤ |scalea| ≤ 2^{(E_{MAX}-2)/2} |
2^{E_{MIN}/2}≤ |scaleb| ≤ 2^{(E_{MAX}-2)/2} |
|shifta| ≤ 2^{E_{MAX}-2} |
|shiftb| ≤ 2^{E_{MAX}-2} |
2^{E_{MIN}/2}≤a[i] ≤ 2^{(E_{MAX}-2)/2} |
2^{E_{MIN}/2}≤b[i] ≤ 2^{(E_{MAX}-2)/2} |
a[i] ≠ - (shifta/scalea)*(1-δ_{1}), |δ_{1}| ≤ 2^{1-(p-1)/2} |
b[i] ≠ - (shiftb/scaleb)*(1-δ_{2}), |δ_{2}| ≤ 2^{1-(p-1)/2} |
E_{MIN} and E_{MAX} are the minimum and maximum exponents and p is the number of significant bits (precision) for the corresponding data type according to the ANSI/IEEE Standard 754-2008 ([ IEEE754 ]):
for single precision E_{MIN} = -126, E_{MAX} = 127, p = 24
for double precision E_{MIN} = -1022, E_{MAX} = 1023, p = 53
The thresholds become less strict for common cases with scalea =0 and/or scaleb =0:
if scalea =0, there are no limitations for the values of a[i] and shifta .
if scaleb =0, there are no limitations for the values of b[i] and shiftb .
To use the v?linearfracv?LinearFrac to shift vector a by a scalar value, set scaleb to 0. Note that even if scaleb is 0, b must be declared.
To use the v?linearfracv?LinearFrac to compute shifta /( scaleb · b [ i ]+ shiftb ), set scalea to 0. Note that even if scalea is 0, a must be declared.