ANINT
Returns the nearest integer to x.
Format
ANINT(x)Description
ANINT(x) = floor(val) if val is greater than or equal to zero.
AINT(x) = ceil(val) if val is less than zero ; where
val = x + 0.5 if x is greater than or equal to zero.
val = x - 0.5 if x is less than zero.
Arguments
- x
- Any valid function expression.
Example
<Reference_Variable
id = "1"
label = "ANINT Example"
type = "EXPRESSION"
expr = "ANINT(AY(569,193))"
/>
ANINT(-1.2) = -1
AINT(5.8) = 6
AINT(0.8) = 1
Comments
The mathematical function floor(x) calculates the largest integer not greater than x. ceil(x) calculates the smallest integer not less than x.