FORTRAN, Intrinsic Procedures, NEAREST
*Conan The Librarian
NEAREST (real-number-a, real-number-b) Class: Elemental function - Generic Returns the nearest different number (representable on the processor) in a given direction. The result type is the same as "real-number-a"; it has the same sign as "real-number-b". Example: If 3.0 and 2.0 are REAL*4 values, NEAREST (3.0, 2.0) has the value 3 + 2**-22, which equals approximately 3.0000002. For more information on the REAL*4 model, see your language reference manual.