[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Two technical questions on IEEE Std 754-2008



Dear 754 members,

2011/2/25 William M Klein <wmklein@xxxxxxxxxxxxx>
 
Can you give me some examples of how/or why a business application might
want to do "numeric" operations on a Nan or Infinity?  As chuck has
indicated, the current draft does let one detect these and to move them to
compatible data items.  What we don't let programs do is use them in
"arithmetic" statements such as the COBOL
 COMPUTE
 ADD, SUBTRACT, DIVIDE, MULTIPLY
 SUM (function and report handling)


Dan Zuras gave examples of infinity in the financial forecasting applications. I will give a simple example for NaNs.

In spreadsheet applications one might have "currently missing data" (for example in my own usage as a professor, a student who was absent in an exam and does not have a grade). How does COBOL deal with such non-numeric entities when it comes to taking the maximum or minimum of a column of data?
 
A simple way to do it in an IEEE754-2008 compliant system would be to use quiet NaN for the missing data and use the maxNum and minNum operations defined on page 19 of 754-2008.

--
Hossam A. H. Fahmy

754 | revision | FAQ | references | list archive