
inter
OVERVIEW OF NUMERIC PROCESSING
Pseudo zero operands behave like unnormals, except in the following cases where they produce the same results as true zeros:
Compare and test instructions
FRNDINT (round to integer)
Division, where the dividend is either a true zero or apseudo zero (the divisor is a pseudo zero)
In addition and subtraction of a pseudo zero and a true zero or another pseudo zero, the pseudo zeroes) behaves like unnormals, except for the determination of the result's sign. The sign is determined as shown in table
INFINITY
The real formats support signed representations of infinities. These values arc encoded with a biased exponent of all ones and a significand of I,:lOO... OO; if the infinity is in a register, it is tagged special. The significand distinguishes infinities from NANs, including real indefinite.
A programmer may code an infinity, or it may be created by the NPX as its masked response to an overflow or a zero divide exception. Note that when rounding is up or down, the masked response may create the largest valid value representable in the destination rather than infinity. See table
NaN (NOT A NUMBER)
A NaN (Not a Number) is a member of a class of special values that exist in the real formats only. A NaN has an exponent of 11..11B, may have either sign, and may have any significand except I,:lOO.. OOB, which is assigned to the infinities. A NaN in a register is tagged special.
The 80287 will generate the special NaN, real indefinite, as its masked response to an invalid operation exception. This NaN is signed negative; its significand is encoded 1,:l100.. 00. All other NaNs represent
Whenever the NPX uses an operand that is a NaN, it signals an invalid operation exception in its status word. If this exception is masked in the 80287 control word, the 80287's masked exception response is to return the NaN as the operation result. If both operands of an instruction are NaNs, the result is the NaN with the larger absolute value. In this way, a NaN that enters a computation propa- gates through the computation and will eventually be delivered as the final result. Note, however, that the transcendental instructions do not check their operands, and a NaN will produce an undefined result.
By unmasking the invalid operation exception, the programmer can use NaNs to trap to the exception handler. The generality of this approach and the large number of NaN values that are available provide the sophisticated programmer with a tool that can be applied to a variety of special situations.
For example, a compiler could use NaNs as references to uninitialized (real) array elements. The compiler could preinitialize each array element with a NaN whose significand contained the index (relative position) of the element. If an application program attempted to access an element that it had not initialized, it would use the NaN placed there by the compiler. If the invalid operation exception were unmaskcd, an interrupt would occur, and the exception handler would be invoked. The exception