This preview shows page 1. Sign up to view the full content.
Unformatted text preview: lity to detect and handle underflow is provided to prevent a vary small result from propagating through a computation and causing another exception (such as overflow during division) to be generated at a later time. Table 4-11. Numeric Underflow (Normalized) Thresholds
Floating-Point Format Single Precision Double Precision Double Extended Precision Underflow Thresholds* | x | < 1.0 2-126 | x | < 1.0 2-1022 | x | < 1.0 2-16382 * Where `x' is the result rounded to destination precision with an unbounded exponent range. How the processor handles an underflow condition, depends on two related conditions: creation of a tiny result creation of an inexact result; that is, a result that cannot be represented exactly in the destination format Which of these events causes an underflow exception to be reported and how the processor responds to the exception condition depends on whether the underflow exception is masked: Underflow exception masked -- The underflow exception is reported (the UE flag is set) only when the result is both tiny and inexact. The processor returns a denormalized result to the destination operand, regardless of inexactness. Underflow exception not masked -- The underflow exception is reported when the result is tiny, regardless of inexactness. The processor leaves the source and destination operands unaltered or stores a biased result in the designating operand (depending whether the underflow exception was generated during an SSE/SSE2/SSE3 floating-point operation or an x87 FPU operation) and invokes a software exception handler. See the following sections for information regarding the numeric underflow exception when detected while executing x87 FPU instructions or while executing SSE/SSE2/SSE3 instructions: x87 FPU; Section 8.5.5, "Numeric Underflow Exception (#U)" SIMD floating-point exceptions; Section 126.96.36.199, "Numeric Underflow Exception (#U)" 188.8.131.52 Inexact-Result (Precision) Exception (#P) The inexact-result exception (also called the precision exception) occurs if the result of an operation is not exactly representable in the destination format. For example, the fraction 1/3 cannot be precisely represented in binary floating-point form. This Vol. 1 4-29 DATA TYPES exception occurs frequently and indicates that some (normally acceptable) accuracy will be lost due to rounding. The exception is supported for applications that need to perform exact arithmetic only. Because the rounded result is generally satisfactory for most applications, this exception is commonly masked. If the inexact-result exception is masked when an inexact-result condition occurs and a numeric overflow or underflow condition has not occurred, the processor sets the PE flag and stores the rounded result in the destination operand. The current rounding mode determines the method used to round the result. See Section 4.8.4, "Rounding." If the inexact-result exception is not masked when an inexact result occurs and n...
View Full Document
This note was uploaded on 10/01/2013 for the course CPE 103 taught by Professor Watlins during the Winter '11 term at Mississippi State.
- Winter '11