HP Fortran Programmer's Reference (September 2007)

Intrinsic procedures
Intrinsic procedure specifications
Chapter 11 599
NEAREST(X, S)
Description
Returns the nearest different machine representable number in a given direction.
Class
Elemental function.
Arguments
X must be of type real.
S must be of type real and not equal to zero.
Result type/
type parameters
Same as X.
Result value
The result has a value equal to the machine representable number distinct from X and nearest
to it in the direction of the infinity with the same sign as S.
NINT(A, KIND)
Optional argument
KIND
Description
Nearest integer.
Class
Elemental function.
Arguments
A must be of type real.
KIND (optional) must be a scalar integer initialization expression.