[Cfp-interest] Modes/flags

Fred J. Tydeman tydeman at tybor.com
Tue Feb 8 09:36:54 PST 2011


On Mon, 07 Feb 2011 15:38:06 -0800 Jim Thomas wrote:
>
>And, we'll start on the "Rounding attributes/modes and flags" document:
>
>http://wiki.dinkumware.com/twiki/pub/CFP/CfpRoundingAttributesModesFlags/Rounding_Jan_2011.rtf 

Some comments on that paper:

No leading '_' on FE_DEC_* rounding macros.

feraiseexcept() is implementation defined (not undefined) on inexact
along with overflow, underflow.

We need to make it clear that feclearexcept(), feraiseexcept() alters 
the flags of ALL FPUs (binary and decimal).

We need to make it clear that fetestexcept() gets the union of all
flags of ALL FPUs (binary and decimal).

If and when we add the ability to enable trapping, we need to make it
clear about the interaction between raising (setting) flags and taking
a trap.

I believe that the existing C99 FE_DFL_ENV is usable to set
the default FP environment.  But, since it is both control
modes and status flags, it is more than just modes.  A
programmer could get current status flags, set default env,
then restore the status flags as a means to alter just modes.


---
Fred J. Tydeman        Tydeman Consulting
tydeman at tybor.com      Testing, numerics, programming
+1 (775) 358-9748      Vice-chair of PL22.11 (ANSI "C")
Sample C99+FPCE tests: http://www.tybor.com
Savers sleep well, investors eat well, spenders work forever.



More information about the Cfp-interest mailing list