# Round

Computes a rounded to nearest integer value for each vector element.

## Syntax

Fortran:

call vsround( n, a, y )

call vdround( n, a, y )

C:

vsRound( n, a, y );

vdRound( 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 vsround DOUBLE PRECISION, INTENT(IN) for vdround C: const float* for vsRound const double* for vdRound | 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 vsround DOUBLE PRECISION for vdround C: float* for vsRound double* for vdRound | 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 away from zero. That is, 0.5 -> 1, -1.5 -> -2, etc.

Parent topic: Rounding Functions