Intel® Fortran Compiler Classic and Intel® Fortran Compiler Developer Guide and Reference

ID 767251
Date 3/22/2024
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

IEEE_INT

Elemental Module Intrinsic Function (Generic): Enables conversion to INTEGER type.

Module

USE, INTRINSIC :: IEEE_ARITHMETIC

result = IEEE_INT (a, round [, kind])

a

(Input) Must be of type REAL or INTEGER.

round

(Input) Must be of type IEEE_ROUND_TYPE.

kind

(Input; optional) Must be a scalar INTEGER constant.

Results

The result type is INTEGER. If kind is present, the kind type parameter is that specified by kind; otherwise, the kind type parameter is default integer.

The result is the value of a converted to integer according to the rounding mode specified by round if the values can be represented in the representation method of the result type kind; otherwise, the result is processor dependent and IEEE_INVALID is signaled.

The result must be consistent with the ISO/IEC/IEEE 60559:2011 operation convertToInteger{round} or convertToIntegerExact{round}. The processor consistently chooses which operation is performed.

Example

The result value of IEEE_INT (63.5, IEEE_DOWN) is 63. If converToIntegerExact{round} is used, IEEE_INEXACT will signal.