User's Manual

OVERVIEW
OF
NUMERIC PROCESSING
Denormals are rarely encountered
in
most applications. Typical debugged algorithms generate extremely
small results during the evaluation of intermediate sub expressions; the final result
is
usually of an
appropriate magnitude for its short or long real destination.
If
intermediate results are held in tempo-
rary real, as
is
recommended, the great range of this format makes underflow very unlikely. Denormals
are likely to arise only when an application generates a great many intermediates,
so
many that they
cannot be held on the register stack or in temporary real memory variables.
If
storage limitations force
the use of short or long reals for intermediates, and small values are produced, underflow may occur,
and,
if
masked, may generate denormals.
Accessing a denormal may produce an exception as shown in table
1-8.
(The denormalized exception
signals
that
a denormal has been fetched.) Denormals may have reduced significance due to lost low-
order bits, and an option of the proposed
IEEE
standard precludes operations on
non
normalized
operands. This option may be implemented in the
. form of an exception handler
that
responds to
unmasked denormalized exceptions. Most users will mask this exception
so
that computation may
proceed; any loss of accuracy will be analyzed by the user when the final result
is
delivered.
As table
1-8
shows, the division and remainder operations
do
not accept denormal divisors and raise
the invalid operation exception. Recall also that the transcendental instructions require normalized
operands and
do
not check for exceptions. In all other cases, the
NPX
converts denormals to unnor-
mals, and the rules governing unnormal arithmetic then apply
(unnormal~
are described
in
the follow-
ing section).
Unnormals-Descendents
of Denormal Operands
An unnormal
is
the result of a computation using denormal operands and
is
therefore the descendent
of the
80287's masked underflow response. An unnormal may exist only
in
the temporary real format;
it may have any exponent that a normal value may have (that
is,
in biased form any nonzero value),
but it
is
distinguished from a normal by the integer bit of its significand, which
is
always
O.
An unnor-
mal in a register
is
tagged valid. Unnormals are distinct from denormals, which have an exponent of
00 ... 00 in biased form.
Unnormals allows arithmetic to continue following an underflow while still retaining their identity as
numbers that may have reduced significance. That is, unnormal operands generate un normal results,
so
long as their unnormality has a significant effect on the result. Unnormals are thus prevented from
"masquerading" as normals, numbers that have full significance. On the other hand, if an unnormal
has an insignificant effect
on
a calculation with a normal, the result will be normal. For example,
adding a small un normal to a large. normal yields a normal result. The converse situation yields an
unnormal.
Table 1-8. Exceptions Due to Denormal Operands
Operation Exception
Masked Response
FLD (short/long real)
D Load as equivalent un normal
Arithmetic (except following)
D Convert (in a
work
area) denormal to equivalent
un normal and proceed
Compare and test D
Convert (in a
work
area) denormal
to
equivalent
un normal and proceed
Division
or
FPREM with
I Return real indefinite
denormal divisor
1-23