[Cfp-interest] FP_EXCEPTIONAL_TEST
David Hough CFP
pcfp at oakapple.net
Tue May 20 22:50:26 PDT 2014
I'm thinking of adding to the other proposals I've made, another special macro
FP_EXCEPTIONAL_TEST( compound-statement)
which returns a bit mask of the 5 standard IEEE exceptions arising in the
compound-statement, leaving the "global" IEEE flags unchanged, and disabling
any more globally-defined alternate exception handling.
This would be a shorthand for those who might want to know about all five
exceptions, or in situations where this would offer a performance advantage.
It would almost always be non-zero because of inexact exceptions.
It's equivalent to saving the flag set before, restoring it after, and
returning as the macro value the flags that arose in compound-statement.
Except for underflow, which is an interesting question: should it report
whether the underflow exception arose, or whether the underflow flag would
have been raised. For underflow, those are not the same.
More information about the Cfp-interest
mailing list