HP-UX Floating-Point Guide
58 Chapter 2
Floating-Point Principles and the IEEE Standard for Binary Floating-Point Arithmetic
Exception Conditions
conditions. On HP 9000 systems, the definition of loss of accuracy in
underflow conditions includes all inaccuracies, whether they originate
from denormalization or are inherent in the operation.
NOTE In many properly functioning applications, underflows may occur in the
normal course of execution—for example, in convergence algorithms.
Many mathematically intensive applications encounter underflow
conditions occasionally.
Underflow conditions can slow down floating-point operations
considerably on HP 9000 systems. See “Denormalized Operands” on
page 182 for information on what to do about performance problems
caused by underflows.
Invalid Operation Conditions
An invalid operation condition occurs whenever the system attempts
to perform an operation that has no numerically meaningful
interpretation. The following are invalid operations (also called
operation errors, operand errors, or domain errors):
• Magnitude subtraction of infinities (see Table 2-3 on page 44)
• Multiplication of zero by infinity
• Division of zero by zero or division of infinity by infinity
• Taking remainder(x, y) when x is infinity or y is zero (see “The
Remainder Operation” on page 66)
• Taking the square root of a negative value (except for negative zero)
• Conversion of a floating-point value to an integer format when the
floating-point value is an infinity or NaN or when the conversion
results in a value outside the range of the integer format
• Comparison involving a <, <=, >, or >= operator when at least one
operand is a NaN (see “Comparison” on page 62)
• Any operation on a signaling NaN
Out-of-range results that occur while converting from floating-point to
integer trigger invalid operation conditions, but all floating-point
overflows produce overflow conditions.