ANINT(A [, KIND])
rounds its argument to the nearest whole number.
Fortran 77 and later
Elemental function
RESULT = ANINT(A [, KIND])
A | The type of the argument shall be REAL . |
KIND | (Optional) An INTEGER initialization expression indicating the kind parameter of the result. |
The return value is of type real with the kind type parameter of the argument if the optional KIND is absent; otherwise, the kind type parameter will be given by KIND. If A is greater than zero, ANINT(A)
returns AINT(X+0.5)
. If A is less than or equal to zero then it returns AINT(X-0.5)
.
Name | Argument | Return type | Standard |
AINT(A) |
REAL(4) A |
REAL(4) |
Fortran 77 and later |
DNINT(A) |
REAL(8) A |
REAL(8) |
Fortran 77 and later |
© Free Software Foundation
Licensed under the GNU Free Documentation License, Version 1.3.
https://gcc.gnu.org/onlinedocs/gcc-10.2.0/gfortran/ANINT.html