Platform | x64, Win32, .NET |
Purpose |
To get the nearest available value to the right or to the left. |
Class |
Elemental function. |
Syntax |
REAL FUNCTION NEAREST(X, S) |
Description |
The sign of S provides the direction. A positive value means to the right (towards positive infinity); a negative value means to the left (towards negative infinity). S must not be zero. |
Return value |
The result is the nearest machine representable value to X (that is not equal to X) in the given direction. |