exceptionfloating-pointlanguage-lawyerieee-754underflow

IEEE 754: Underflow: is inexact flag required to be raised?


IEEE 754-2008, 7.5 Underflow:

The underflow exception shall be signaled ...

... the underflow flag shall be raised and the inexact (see 7.6) exception shall be signaled.

Here we see that:

Simple question: is inexact flag required to be raised?

Reason of the question: as I understand: flag is raised != exception is signaled. Is that correct?


Solution

  • Yes.

    7.6 Inexact (emphaisis added):

    When all of these exceptions are handled by default, the inexact flag is always raised when either the overflow or underflow flag is raised.