Developer Reference for Intel® oneAPI Math Kernel Library for Fortran
v?Rint
vsRint vmsRint vdRint vmdRint Computes a rounded integer value in the current rounding mode.
Syntax
call vsrint ( n , a , y )
call vsrinti(n, a, inca, y, incy)
call vmsrint ( n , a , y , mode )
call vmsrinti(n, a, inca, y, incy, mode)
call vdrint ( n , a , y )
call vdrinti(n, a, inca, y, incy)
call vmdrint ( n , a , y , mode )
call vmdrinti(n, a, inca, y, incy, mode)
Include Files
mkl_vml.f90
Input Parameters
Name |
Type |
Description |
|---|---|---|
n |
Specifies the number of elements to be calculated. |
|
a |
Fortran 77: DOUBLE PRECISION for vdrint , vmdrintFortran 90: REAL , INTENT(IN) for vsrint , vmsrintFortran 90: DOUBLE PRECISION , INTENT(IN) for vdrint , vmdrint |
Array that specifies the input vector a . |
inca , incy |
INTEGER, INTENT(IN) |
Specifies increments for the elements of a and y . |
mode |
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 vdrint , vmdrintFortran 90: REAL , INTENT(OUT) for vsrint , vmsrintFortran 90: DOUBLE PRECISION , INTENT(OUT) for vdrint , vmdrint |
Array that specifies the output vector y . |
Description
The v?Rint function computes a rounded floating-point integer value using the current rounding mode for each vector element.
The rounding mode affects the results computed for inputs that fall between consecutive integers. For example:
f(0.5) = 0 , for rounding modes set to round to nearest round toward zero or to minus infinity.
f(0.5) = 1 , for rounding modes set to plus infinity.
f(-1.5) = -2 , for rounding modes set to round to nearest or to minus infinity.
f(-1.5) = -1 , for rounding modes set to round toward zero or to plus infinity.
Special Values for Real Function v?Rint(x)
Argument |
Result |
Exception |
|---|---|---|
+0 |
+0 |
|
-0 |
-0 |
|
|
|
|
|
|
|
SNAN |
QNAN |
INVALID |
QNAN |
QNAN |