NEAREST(X, S)
returns the processor-representable number nearest to X
in the direction indicated by the sign of S
.
Fortran 90 and later
Elemental function
RESULT = NEAREST(X, S)
X | Shall be of type REAL . |
S | Shall be of type REAL and not equal to zero. |
The return value is of the same type as X
. If S
is positive, NEAREST
returns the processor-representable number greater than X
and nearest to it. If S
is negative, NEAREST
returns the processor-representable number smaller than X
and nearest to it.
© Free Software Foundation
Licensed under the GNU Free Documentation License, Version 1.3.
https://gcc.gnu.org/onlinedocs/gcc-10.2.0/gfortran/NEAREST.html