The IEEE 754 standard for floating point numbers defines a flag that is set when a result from floating point calculation isn't exact, i.e. has to be rounded. What algorithms are there that utilize that information?

  • 1
    $\begingroup$ In 35+ years of working on hardware and software that uses IEEE-754 floating-point, I have never come across a use for the inexact flag. There have been some creative uses of IEEE-754 compliant hardware for wide-format integer arithmetic (using sub-normal operands, as I recall) and it may come in handy in such a context, but this is conjecture on my part. $\endgroup$
    – njuffa
    Commented Jun 19, 2022 at 2:55
  • $\begingroup$ @njuffa I'd imagine there has to be some use for it because there has to be some reason for why it was included in the standard. $\endgroup$
    – QuantumWiz
    Commented Jun 19, 2022 at 22:08
  • 1
    $\begingroup$ I cannot find anything relevant in Jerome Coonen's PhD thesis. William Kahan's lecture notes contain this: The INEXACT trap is disabled and its flag ignored by almost all floating-point software. Its flag can be used to improve the accuracy of extremely delicate approximate computations by “ Exact Preconditioning,” a scheme too arcane to be explained here; for an example see pp. 107-110 of Hewlett-Packard’s HP-15C Advanced Functions Handbook (1982) #00015-90011. Another subtle use for the INEXACT flag is to indicate whether an equation f(x) = 0 is satisfied exactly [...] $\endgroup$
    – njuffa
    Commented Jun 19, 2022 at 22:56
  • 1
    $\begingroup$ An electronic version of the Hewlett-Packard HP-15C Advanced Functions Handbook (1982) cited by Kahan can be found here: literature.hpcalc.org/community/hp15c-afh-en.pdf During a quick perusal of pages 107-110 I did not find any mention of the IEEE-754 inexact flag. My personal take is that the inexact flag this is one of those "we thought it was a good idea at the time" features of which one can find a couple in most standards, and that turn out to be useless in practice. $\endgroup$
    – njuffa
    Commented Jun 19, 2022 at 23:06
  • $\begingroup$ @njuffa I happened to find this text by Kahan which describes an "arcane" process for reducing cancellation error in certain matrix operations which according to him was one of the motives for including the inexact flag. I didn't quite understand the process though I didn't read it with care. I wonder if this is the only use or whether there are others. $\endgroup$
    – QuantumWiz
    Commented Jun 22, 2022 at 14:37


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.