Intel® Fortran Compiler 16.0 User and Reference Guide

IEEE_RINT

Elemental Module Intrinsic Function (Generic): Returns an integer value rounded according to the current rounding mode.

Module

USE, INTRINSIC :: IEEE_ARITHMETIC

result = IEEE_RINT (x)

x

(Input) Must be of type REAL.

Results

The result type and kind is the same as x. The value of the result is x rounded to an integer according to the current rounding mode. If the result value is zero, the sign is the same as x.

Example

If the current rounding mode is IEEE_UP, the value of IEEE_RINT (2.2) is 3.0.

If the current rounding mode is IEEE_NEAREST, the value of IEEE_RINT (2.2) is 2.0.

See Also