User's Manual

OVERVIEW OF NUMERIC PROCESSING
o
PROJECTIVE
CLOSURE
-00
+
+00
.,~.~----~----~.~,.
o
AFFINE
CLOSURE
Figure 1-10. Projective versus Affine Closure
G30108
means of closure
is
projective, and this
is
recommended
for
most computations. When projective closure
is
selected, the
NPX
treats the special values
+00
and
-00
as
a single unsigned infinity (similar to its
treatment of signed zeros). In the affine mode the
NPX
respects the signs of
+00
and
-00.
While affine mode may provide more information than projective, there are occasions when the sign
may in fact represent misinformation. For example, consider an algorithm that yields an intermediate
result x of
+0
and
-0
(the same numeric value)
in
different executions.ยท
If
llx
were then computed
in affine mode, two entirely different values
(+
00
and -
(0)
would result from numerically identical
values of
x.
Projective mode,
on
the other hand, provides less information but never returns misinfor-
mation. In general, then, projective mode should be used globally, with affine mode reserved for local
computations where the programmer can take advantage of the sign and
knows
for certain that the
nature of the computations will not produce a misleading result.
SPECIAL
COMPUTATIONAL
SITUATIONS
Besides being able to represent positive and negative numbers, the 80287 data formats may be used to
describe other entities. These special values provide extra flexibility, but most users
will
not need to
understand them
in
order to use the 80287 successfully. This section describes the special values that
may occur in certain cases and the significance of each. The 80286 exceptions are also described, for
writers of exception handlers and for those interested
in
probing the limits of computation using the
80287.
Th
...
m~teriHl
presented in this section
is
mainly of interest to programmers concerned with writing
exception handlers. For many readers, this section can be browsed lightly.
Special Numeric Values
The 80287 data formats encompass encodings for a variety of special values
in
addition to the typical
real or integer data values that result from normal calculations. These special values have significance
1-20