7-18
FLOATING-POINT UNIT
The double precision and single precision settings, reduce the size of the significand to 53 bits
and 24 bits, respectively. These settings are provided to support the IEEE standard and to allow
exact replication of calculations which were done using the lower precision data types. Using
these settings nullifies the advantages of the extended-real formats 64-bit significand length.
When reduced precision is specified, the rounding of the significand value clears the unused bits
on the right to zeros.
The precision-control bits only affect the results of the following floating-point instructions:
FADD, FADDP, FSUB, FSUBP, FSUBR, FSUBRP, FMUL, FMULP, FDIV, FDIVP, FDIVR,
FDIVRP, and FSQRT.
7.3.4.3.ROUNDING CONTROL FIELD
The rounding control (RC) field of the FPU control register (bits 10 and 11) controls how the
results of floating-point instructions are rounded. Four rounding modes are supported (refer to
Table 7-5): round to nearest, round up, round down, and round toward zero. Round to nearest is
the default rounding mode and is suitable for most applications. It provides the most accurate
and statistically unbiased estimate of the true result.
The round up and round down modes are termed directed rounding and can be used to imple-
ment interval arithmetic. Interval arithmetic is used to determine upper and lower bounds for the
true result of a multistep computation, when the intermediate results of the computation are
subject to rounding.
The round toward zero mode (sometimes called the chop mode) is commonly used when
performing integer arithmetic with the FPU.
Whenever possible, the FPU produces an infinitely precise result in the destination format
(single, double, or extended real). However, it is often the case that the infinitely precise result
of an arithmetic or store operation cannot be encoded exactly in the format of the destination
operand.
Table 7-5. Rounding Control Field (RC)
Rounding
Mode
RC Field
Setting
Description
Round to
nearest (even)
00BRounded result is the closest to the infinitely precise result. If two values
are equally close, the result is the even value (that is, the one with the
least-significant bit of zero).
Round down
(toward
??
)
01BRounded result is close to but no greater than the infinitely precise
result.
Round up
(toward
+?
)
10BRounded result is close to but no less than the infinitely precise result.
Round toward
zero (Truncate)
11BRounded result is close to but no greater in absolute value than the
infinitely precise result.