Next: NOT, Previous: NEW_LINE, Up: Intrinsic Procedures
NINT
— Nearest whole numberNINT(X)
rounds its argument to the nearest whole number.
RESULT = NINT(X [, KIND])
X | The type of the argument shall be REAL .
|
KIND | (Optional) An INTEGER initialization
expression indicating the kind parameter of the result.
|
INTEGER
of the default kind.
program test_nint real(4) x4 real(8) x8 x4 = 1.234E0_4 x8 = 4.321_8 print *, nint(x4), idnint(x8) end program test_nint
Name | Argument | Standard
|
IDNINT(X) | REAL(8) | Fortran 95 and later
|