# NearbyInt

Computes a rounded integer value in a current rounding mode for each vector element.

## Syntax

Fortran:

call vsnearbyint( n, a, y )

call vdnearbyint( n, a, y )

C:

vsNearbyInt( n, a, y );

vdNearbyInt( n, a, y );

## Input Parameters

Name | Type | Description
--- | --- | ---
n | FORTRAN: INTEGER, INTENT(IN) C: int | Specifies the number of elements to be calculated.
a | FORTRAN: REAL, INTENT(IN) for vsnearbyint DOUBLE PRECISION, INTENT(IN) for vdnearbyint C: const float* for vsNearbyInt const double* for vdNearbyInt | FORTRAN: Array, specifies the input vector a. C: Pointer to an array that contains the input vector a.

## Output Parameters

Name | Type | Description
--- | --- | ---
y | FORTRAN: REAL for vsnearbyint DOUBLE PRECISION for vdnearbyint C: float* for vsNearbyInt double* for vdNearbyInt | FORTRAN: Array, specifies the output vector y. C: Pointer to an array that contains the output vector y.

## Description

Halfway values, that is, 0.5, -1.5, and the like, are rounded off towards even values.

Parent topic: Rounding Functions