Description: | Returns the nearest different number (representable on the processor) in a given direction. | ||

Class: |
Elemental function; Generic | ||

Arguments: |
X | Must be of type real. | |

S | Must be of type real and nonzero. | ||

Results: | The result type is the same as X. The result has a value equal to the machine representable number that is different from and nearest to X, in the direction of infinity, with the same sign as S. |

**Examples**

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 model for REAL(4), see
Section D.2.)

Previous Page Next Page Table of Contents