XL Fortran for AIX 8.1
Language Reference
Nearest integer.
- A
- must be of type real.
- KIND (optional)
- must be a scalar integer initialization expression.
Class
Elemental function
Result Type and Attributes
- Integer.
- If KIND is present, the kind type parameter is that specified by
KIND; otherwise, the kind type parameter is that of the default integer
type.
Result Value
- If A > 0, NINT (A) has the value
INT (A + 0.5).
- If A <= 0, NINT (A) has the value
INT (A - 0.5).
- The result is undefined if its value cannot be represented in the
specified integer type.
Examples
NINT (2.789) has the value 3. NINT (2.123) has the
value 2.
Specific Name
| Argument Type
| Result Type
| Pass As Arg?
|
NINT
| default real
| default integer
| yes
|
IDNINT
| double precision real
| default integer
| yes
|
IQNINT
| REAL(16)
| default integer
| yes(1)
|
Notes:
- IBM Extension: the ability to pass the name as an argument.
[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]