Computes a rounded integer value in the current rounding mode for each vector element.
FORTRAN:
call vsnearbyint( n, a, y )
call vmsnearbyint( n, a, y, mode )
call vdnearbyint( n, a, y )
call vmdnearbyint( n, a, y, mode )
C:
vsNearbyInt( n, a, y );
vmsNearbyInt( n, a, y, mode );
vdNearbyInt( n, a, y );
vmdNearbyInt( n, a, y, mode );
Name |
Type |
Description |
---|---|---|
n |
FORTRAN 77: INTEGER Fortran 90: INTEGER, INTENT(IN) C: const int |
Specifies the number of elements to be calculated. |
a |
FORTRAN 77: REAL for vsnearbyint, vmsnearbyint DOUBLE PRECISION for vdnearbyint, vmdnearbyint Fortran 90: REAL, INTENT(IN) for vsnearbyint, vmsnearbyint DOUBLE PRECISION, INTENT(IN) for vdnearbyint, vmdnearbyint C: const float* for vsNearbyInt, vmsnearbyint const double* for vdNearbyInt, vmdnearbyint |
FORTRAN: Array that specifies the input vector a. C: Pointer to an array that contains the input vector a. |
mode |
FORTRAN 77: INTEGER*8 Fortran 90: INTEGER(KIND=8), INTENT(IN) C: const MKL_INT64 |
Overrides global VML mode setting for this function call. See vmlSetMode for possible values and their description. |
Name |
Type |
Description |
---|---|---|
y |
FORTRAN 77: REAL for vsnearbyint, vmsnearbyint DOUBLE PRECISION for vdnearbyint, vmdnearbyint Fortran 90: REAL, INTENT(OUT) for vsnearbyint, vmsnearbyint DOUBLE PRECISION, INTENT(OUT) for vdnearbyint, vmdnearbyint C: float* for vsNearbyInt, vmsnearbyint double* for vdNearbyInt, vmdnearbyint |
FORTRAN: Array that specifies the output vector y. C: Pointer to an array that contains the output vector y. |
The v?NearbyInt function computes a rounded integer value in a current rounding mode for each vector element.
Halfway values, that is, 0.5, -1.5, and the like, are rounded off towards even values.