This preview shows page 1. Sign up to view the full content.
Unformatted text preview: is possible to do so, a program
should handle exceptional data in a manner consistent with the handling of
standard data. For example, a program which reads integers from an input
le and echos them to an output le until the end of the input le is reached
should not fail just because the input le is empty. On the other hand, if
it is further required to compute the average value of the input data, no
reasonable solution is available if the input le is empty. So it is with oating
point arithmetic. When a reasonable response to exceptional data is possible,
it should be used.
The simplest example is division by zero. Before the IEEE standard was
devised, there were two standard responses to division of a positive number
by zero. One often used in the 1950's was to generate the largest oating
point number as the result. The rationale o ered by the manufacturers was
that the user would notice the large number in the output and draw the
conclusion that something had gone wrong. However, this oft...
View Full Document
This note was uploaded on 02/12/2014 for the course MATH 4800 taught by Professor Lie during the Spring '09 term at Rensselaer Polytechnic Institute.
- Spring '09