-qieee

Category

Floating-point and integer control

Purpose

Specifies the rounding mode that the compiler will use when it evaluates constant floating-point expressions at compile time.

Syntax

Read syntax diagramSkip visual syntax diagram
                 .-Near--.   
>>- -q--ieee--=--+-Minus-+-------------------------------------><
                 +-Plus--+   
                 '-Zero--'   

@PROCESS:

@PROCESS IEEE({Near | Minus | Plus | Zero})

Defaults

Near, which rounds to the nearest representable number.

Parameters

The choices are:
Near
Round to nearest representable number.
Minus
Round toward minus infinity.
Plus
Round toward plus infinity.
Zero
Round toward zero.

Usage

Use this option in combination with the XL Fortran subroutine fpsets or some other method of changing the rounding mode at run time. It sets the rounding mode that is used for compile-time arithmetic (for example, evaluating constant expressions such as 2.0/3.5).

Specifying the same rounding mode for compile-time and runtime operations avoids inconsistencies in floating-point results.

Note: Compile-time arithmetic is most extensive when you also specify the -O option.

If you change the rounding mode from the default (round-to-nearest) at run time, be sure to also specify -qfloat=rrm to turn off optimizations that only apply in the default rounding mode.

If your program contains operations involving real(16) values, the rounding mode must be set to -qieee=near, round-to-nearest.

Related information