Intel® Fortran Compiler 18.0 Developer Guide and Reference

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'

The closer of the two nearest representable values, if one is closer than the other.

If the two nearest representable values are equidistant from the original value, the processor determines which one of them is chosen.

On processors that support IEEE rounding on conversions, NEAREST corresponds to round to nearest, as specified in the IEEE International Standard.

'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 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'.

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.