NINT (real-number [,kind])
Class: Elemental function - Generic
Returns the value of the integer nearest to the value of the
argument.
The result is of type integer. If "kind" is present, the kind
parameter of the result is that specified by "kind"; otherwise, the
kind parameter of the result is that shown in the following table.
If the processor cannot represent the result value in the kind of
the result, the result is undefined.
+------+-----------+----------+------------+-------------+
| Args | Generic | Specific | Argument | Result Type |
+------+-----------+----------+------------+-------------+
| 1 | | ININT | REAL*4 | INTEGER*2 |
| |see note1 | NINT | REAL*4 | INTEGER*4 |
| | | KNINT | REAL*4 | INTEGER*8 |
| | | IIDNNT | REAL*8 | INTEGER*2 |
| |see note2 | IDNINT | REAL*8 | INTEGER*4 |
| | | KIDNNT | REAL*8 | INTEGER*8 |
| | | IIQNNT | REAL*16 | INTEGER*2 |
| |see note3 | IQNINT | REAL*16 | INTEGER*4 |
| | | KIQNNT | REAL*16 | INTEGER*8 |
+------+-----------+----------+------------+-------------+
Note1: Or JNINT.
Note2: Or JIDNNT. For compatibility with older versions
of Fortran, IDNINT can also be specified as a generic
function.
Note3: Or JIQNNT. For compatibility with older versions
of Fortran, IQNINT can also be specified as a generic
function.
The setting of compiler options specifying integer size can affect
NINT, IDNINT, and IQNINT.