Intel 80286 Computer Accessories User Manual


 
OVERVIEW OF NUMERIC PROCESSING
The
NPX
usually carries the digits of the significand in normalized form. This means that, except for
the value zero, the significand
is
an integer and a fraction
as
follows:
l~fff
..
.ff
where
~
indicates an assumed binary point. The number of fraction bits varies according to the real
format:
23
for short,
52
for
long, and
63
for temporary real.
By
normalizing real numbers
so
that their
integer bit
is
always a
1,
the 80287 eliminates leading zeros in small values
(Ix!
<
1).
This technique
maximizes the number of significant digits that can be accommodated in a significand of a given width.
Note that, in the short and long real formats, the integer bit
is
implicit and
is
not actually stored; the
integer bit
is
physically present in the temporary real format
only.
If
one were to examine only the signficand with its assumed binary point, all normalized real numbers
would have values between 1 and
2.
The exponent field locates the actual binary point in the significant
digits. Just as in decimal scientific notation, a positive exponent has the effect of moving the binary
point to the right, and a negative exponent effectively moves the binary point
to
the left, inserting
leading zeros
as
necessary. An unbiased exponent of zero indicates that the position of the assumed
binary point
is
also the position of the actual binary point. The exponent field, then, determines a real
number's magnitude.
In order to simplify comparing real numbers (e.g., for sorting), the
80287 stores exponents in a biased
form. This means that a constant
is
added to the true exponent described above. The value of this bias
is
different for each real format (see figure
1-9).
It
has been chosen
so
as
to force the biased exponent
to be a positive value. This allows two real numbers (of the same format and sign) to be compared
as
if they are unsigned binary integers. That
is,
when comparing them bitwise from left to right (begin-
ning with the leftmost exponent bit), the first bit position that differs orders the numbers; there
is
no
need to proceed further with the comparison. A number's true exponent can be determined simply
by
subtracting the bias value of its format.
The short and long real formats exist in memory only.
If
a number in one of these formats
is
loaded
into an
80287 register, it
is
automatically converted to temporary real, the format used
for
all internal
operations. Likewise, data in registers can be converted to short or long real for storage in memory.
The temporary real format may be used in memory also, typically to store intermediate results
that
cannot be held in registers.
Most applications should use the long real form to store real number data and results; it provides
sufficient range and precision to return correct results with a minimum of programmer attention. The
short real format
is
appropriate for applications that are constrained
by
memory, but it should be
recognized that this format provides a smaller margin of safety.
It
is
also
useful for debugging algorithms,
because roundoff problems will manifest themselves more quickly in this format. The temporary real
format should normally
be
reserved for holding intermediate results,
loop
accumulations, and constants.
Its extra length
is
designed to shield final results from the effects of rounding and overflow/underflow
in intermediate calculations. However, the range and precision of the long real form are adequate for
most microcomputer applications.
Rounding Control
Internally, the 80287
employ~
three extra bits (guard, round, and sticky bits) that enable it
to
represent
the infinitely precise true result of a computation; these bits are not accessible
to
programmers. Whenever
the destination can represent the infinitely precise true result, the
80287 delivers it. Rounding occurs
1-18