[Cfp-interest 2155] feraiseexcept update

Jim Thomas jaswthomas at sbcglobal.net
Mon Sep 27 11:58:01 PDT 2021


F.8.6 has:

[2] If the argument to the feraiseexcept function in <fenv.h> represents IEC 60559 valid coincident floating-point exceptions for atomic operations (namely "overflow" and "inexact", or "underflow" and "inexact"), then "overflow" or "underflow" is raised before "inexact”.

This wording is out of date in two ways.

1. IEC 60559 no longer refers to coincident exceptions. This is part a clarification that, in the two cases mentioned, the “inexact” exception is signed by the default handling of the “overflow” or “underflow” exception and is not signaled directly by the operation. Under default exception handling the ordering of the exceptions isn’t detectable, but the ordering would be needed by alternate exception handling extensions. 

2. C has a different  meaning for “atomic operations” than is intended here. See 7.17.

Here’s a suggestion for updating the wording:

[2] If the floating-point exceptions represented by the argument to the feraiseexcept function in <fenv.h> include both "overflow" and "inexact", then "overflow" is raised before "inexact”. Similarly, if the represented exceptions include both "underflow" and "inexact", then "underflow" is raised before "inexact”.

I don’t think the requirement should be removed, because code that runs with alternate exception handling extensions might depend on the ordering.

- Jim Thomas

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.oakapple.net/pipermail/cfp-interest/attachments/20210927/9734b4c8/attachment-0001.htm>


More information about the Cfp-interest mailing list