NINT(A)
rounds its argument to the nearest whole number.
Fortran 77 and later, with KIND argument Fortran 90 and later
Elemental function
RESULT = NINT(A [, KIND])
A | The type of the argument shall be REAL . |
KIND | (Optional) An INTEGER initialization expression indicating the kind parameter of the result. |
Returns A with the fractional portion of its magnitude eliminated by rounding to the nearest whole number and with its sign preserved, converted to an INTEGER
of the default kind.
Name | Argument | Return Type | Standard |
NINT(A) |
REAL(4) A |
INTEGER |
Fortran 77 and later |
IDNINT(A) |
REAL(8) A |
INTEGER |
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/NINT.html