Purpose
Nearest whole number.
Argument type and attributes
- A
- An INTENT(IN) REAL
- KIND (optional)
- An INTENT(IN) scalar INTEGER.
The actual argument corresponding to KIND must
be a constant expression.
Result type and attributes
- The result type is real.
- If KIND is present, the kind type parameter
is that specified by KIND; otherwise, the
kind type parameter is that of A.
Result value
- If A > 0, ANINT(A) = AINT(A + 0.5)
- If A ≤ 0, ANINT(A) = AINT(A - 0.5)
Note: The addition and subtraction of 0.5 are done in round-to-zero
mode.
Examples
ANINT(3.555) = 4.0
ANINT(-3.555) = -4.0
Specific Name |
Argument Type |
Result Type |
Pass As Arg? |
ANINT |
default real |
default real |
yes |
DNINT |
double precision real |
double precision real |
yes |
QNINT 1 |
REAL(16) |
REAL(16) |
yes |