NINT(A, KIND)

Purpose

Nearest integer.

Class

Elemental function

Argument type and attributes

A
An INTENT(IN) REAL
KIND (optional)
An INTENT(IN) INTEGER scalar. The actual argument corresponding to KIND must be a constant expression.Fortran 2003 ends

Result type and attributes

Result value

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 
Note:
  •  1  IBM extension