9.203. NEAREST
9.203 NEAREST — Nearest representable number
- Description:
-
NEAREST(X, S)
returns the processor-representable number nearest toX
in the direction indicated by the sign ofS
. - Standard:
-
Fortran 95 and later
- Class:
-
Elemental function
- Syntax:
-
RESULT = NEAREST(X, S)
- Arguments:
-
X Shall be of type REAL
.S Shall be of type REAL
and not equal to zero. - Return value:
-
The return value is of the same type as
X
. IfS
is positive,NEAREST
returns the pr