Floating-Point Rounding Options

On Alpha, each floating-point operation can specify the rounding mode used to generate the result of the operation. There are three IEEE rounding modes that can be set with a compiler switch: round to nearest, round to zero, and round to minus infinity. Use of these switches depends on the methods used by the application to control loss of precision.

In addition, there is a dynamic rounding mode available. Dynamic rounding mode allows the rounding mode to change while the program runs, resulting in a finer level of accuracy versus performance control. Round to plus infinity is only accessible through this switch.

Round to plus infinity and round to minus infinity run significantly slower on Alpha systems.

The default is always to round the result to the nearest floating-point value. Specialized floating-point applications may wish to use the following switches:

/QArc

Round to zero (or chop).

/QArd

Round dynamically. Rounding mode is set dynamically by calls to _ _controlfp. Round to plus infinity is accomplished by compiling with /QArd and calling _ _controlfp (_RC_UP, _MCW_RC).

/QArm

Round to minus infinity.

/QArn

Round to nearest value. This is the default rounding mode.