HP-UX Floating-Point Guide
Chapter 3 75
Factors that Affect the Results of Floating-Point Computations
How Exceptions and Library Errors Affect Application Results
Table 3-1 Effects of Floating-Point Exceptions and Library Errors
The actual nature of the inaccuracies introduced by exceptions and
library errors depends on two main factors:
• The programming environment selected (C, Fortran)
• The additional error-response behavior defined by the programmer
Type of
Error
Default System Behavior
Effect on
Application
Overflow
(ERANGE)
Substitute an infinity as the
result
May be catastrophic
unless specifically
handled
Underflow Substitute either a
denormalized or zero value as
the result: if the result after
rounding would be smaller in
magnitude than MINDOUBLE
(the smallest denormalized
value), substitute zero
Application usually
continues
successfully;
however,
performance may
suffer on some
systems
Invalid
operation
(invalid
argument)
(EDOM)
Substitute a NaN as the result Probably
catastrophic unless
specifically handled
Division by
zero
Substitute an infinity as the
result
May be catastrophic
unless specifically
handled