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

OPEN: ROUND Specifier

The ROUND specifier indicates the I/O rounding mode for the duration of a connection. It takes the following form:

ROUND = rmode

rmode

Is a scalar default character expression that evaluates to one of the following values:

'UP'

The smallest representable value that is greater than or equal to the original value.

'DOWN'

The largest representable value that is less than or equal to the original value.

'ZERO'

The value closest to the original value, but no greater in magnitude than the original value.

'NEAREST'

Conforms to the ISO/IEC/IEEE 60559:2011 standard specification for roundTiesToEven.

'COMPATIBLE'

The closer of the two nearest representable values. If the value is halfway between the two values, the one chosen is the one farther from zero.

'PROCESSOR_DEFINED'

The value is determined by the default settings in the processor, which may correspond to one of the other modes.

The default I/O rounding mode is 'PROCESSOR_DEFINED'. This corresponds to 'NEAREST'.

The rounding modes conform to the corresponding rounding modes specified in the ISO/IEC/IEEE 60559:2011 standard.

You can only use this specifier for a formatted I/O connection.

The rounding mode can be temporarily changed within a READ or WRITE statement by the corresponding RU, RD, RZ, RN, RC, and RP edit descriptors.

This specifier is not allowed on unformatted input or output.