Returns the nearest different processor-representable number in the direction indicated by the sign of S (toward positive or negative infinity).

**X**- must be of type real.
**S**- must be of type real and not equal to zero.

**Class**

Elemental function

**Result Type and Attributes**

Same as X.

**Result Value**

The result is the machine number different from and nearest to X in the direction of the infinity with the same sign as S.

+-------------------------------IBM Extension--------------------------------+

**Examples**

NEAREST (3.0, 2.0) = 3.0 +
2.0^{(-22)}. See Real Data Model.

+----------------------------End of IBM Extension----------------------------+