Submitter:Fred J. Tydeman
Submission Date:2017-03-03
Document: WG14 N2128
Problem being solved
C11 makes several references to "default rounding mode". Yet, there is no symbol for that mode. Although FE_TONEAREST represents the default rounding mode for IEC 60559 implementations, other implementations may have different defaults (for example, IBM S/360 hex floating-point is represented by FE_TOWARDZERO).
Solution
In 7.6 paragraph 8, change
to:Each of the macros
FE_DOWNWARD FE_TONEAREST FE_TOWARDZERO FE_UPWARD
Each of the macros
FE_DOWNWARD FE_TONEAREST FE_TOWARDZERO FE_UPWARD FE_DEFAULT
and change:
The defined macros expand to integer constant expressions whose values are distinct nonnegative values.211)
to:
The defined macros (except for FE_DEFAULT) expand to integer constant expressions whose values are distinct nonnegative values.211) FE_DEFAULT expands to a value of one of the other FE_* macros and is the default rounding mode.
Add FE_DEFAULT to B.5 after FE_TONEAREST.
Add FE_DEFAULT to F.3 item about fegetround before FE_TONEAREST. Also, add to the same item:
FE_DEFAULT expands to the value of FE_TONEAREST.
Add FE_DEFAULT macro, 7.6 to the index.