ANINT
The ANINT(a) function calculates the nearest integer to the expression a.
ANINT(a) = int(a + 0.5) if a > 0
ANINT(a) = int(a - 0.5) if a < 0
The value of the mathematical function int of a variable x is equal to x if x is an integer. If x is not an integer, then int(x) is equal to the nearest integer to x whose magnitude is not greater than the magnitude of x. Therefore:
int(-7.0) = -7, int(-4.8) = -4, and int(4.8) = 4.
Format
ANINT(a)
Arguments
a
|
Any valid function expression.
Number of arguments: 1 |
Examples
ANINT(-4.6) = -5
ANINT(4.6) = 5