{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

In as much as it is possible to do so a program

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

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

{[ snackBarMessage ]}