OVERVIEW OF NUMERIC PROCESSING

(3)Severe underflows in storing to short or long real may generate zeros.

(4)Small values ( Ixl < 1) stored into integers may round to zero.

(5)Sign is determined by round mode:

*= + for nearest, up, or chop

*= - for down

(6)t = sign of X.

(7)Very small values of X and Y may yield zeros, after rounding of true result. NPX signals underflow to warn that zero has been yielded by nonzero operands.

(8)Very small X and very large Y may yield zero, after rounding of true result. NPX signals underflow to warn that zero has been yielded from nonzero operands.

(9)When Y divides into X exactly.

NaNs could also be used to speed up debugging. In its early testing phase, a program often contains multiple errors. An exception handler could be written to save diagnostic information in memory whenever it was invoked. After storing the diagnostic data, it could supply a NaN as the result of the erroneous instruction, and that NaN could point to its associated diagnostic area in memory. The program would then continue, creating a different NaN for each error. When the program ended, the NaN results could be used to access the diagnostic data saved at the time the errors occurred. Many errors could thus be diagnosed and corrected in one test run.

Table 1-11. Masked Overflow Response with Directed Rounding

True Result

 

Rounding

 

 

 

Result Delivered

 

 

Mode

Normalization

Sign

 

 

 

Normal

+

Up

+co

Normal

+

Down

Largest finite positive numberl')

Normal

-

Up

Largest finite negative numberl')

Normal

-

Down

-co

Unnormal

+

Up

+co

Unnormal

-

Down

Largest exponent, result'ssignificand(2)

Unnormal

+

Up

Largest exponent, result'ssignificand(2)

Unnormal

-

Down

-co

NOTES:

I') The largest valid representable reals are encoded: exponent: 11...108

significand: (1 ),:l11 ...108

(2)The significand retains its identity as an unnormal; the true result is rounded as usual (effectively chopped toward 0 in this case). The exponent is encoded 11 ...108.

1-27

Page 379
Image 379
Intel 80286, 80287 manual +co