round(3F) round(3F)
NAME
anint, dnint, nint, idnint, jnint, inint, jidnnt, iidnnt -
Fortran nearest integer functions
SYNOPSIS
integer i
integer*2 i2
real r1, r2
double precision dp1, dp2
i = nint(r1)
i = jnint(r1)
i = nint(dp1)
i = idnint(dp1)
i = jidnnt(dp1)
i2 = nint(r1)
i2 = inint(r1)
i2 = nint(dp1)
i2 = iidnnt(dp1)
r2 = anint(r1)
dp2 = anint(dp1)
dp2 = dnint(dp1)
DESCRIPTION
anint returns the nearest whole real number to its real
argument (i.e., int(a+0.5) if a > 0, int(a-0.5) otherwise).
dnint does the same for its double-precision argument. nint
returns the nearest integer to its real argument. idnint is
the double-precision version. anint is the generic form of
anint and dnint, performing the same operation and returning
the data type of its argument. nint is also the generic
form of idnint.
The functions jnint, jidnnt, inint and iidnnt have been
included to provide compatibility with other vendors and are
not recommended for general use.
Page 1 CX/UX Hf77 Fortran Reference Manual