N2479 C17..C2x working draft — February 5, 2020 ISO/IEC 9899:202x (E): F.3 Operations, 9:
The macros (7.6) FE_DOWNWARD, FE_TONEAREST, FE_TONEARESTFROMZERO, FE_TOWARDZERO, and FE_UPWARD, which are used in conjunction with the fegetround and fesetround functions and the FENV_ROUND pragma, represent the IEC 60559 rounding-direction attributes roundTowardNegative, roundTiesToEven, roundTowardZero, and roundTowardPositive, respectively. Support for the roundTiesToAway attribute for binary floating-point arithmetic, and hence for the FE_TONEARESTFROMZERO macro, is optional.
Let's recap:
C IEEE 754 Comment
FE_DOWNWARD roundTowardNegative
FE_TONEAREST roundTiesToEven
FE_TONEARESTFROMZERO roundTiesToAway roundTiesToAway is missing in the sentence #1
FE_TOWARDZERO roundTowardZero
FE_UPWARD roundTowardPositive
The issue: sentence #1 lists 5 FE_
macros followed by 4 IEEE 754 rounding-direction attributes ending with "respectively".
Is a mistake / typo? Can someone who has the latest published version of the standard check it?
http://www.open-std.org/jtc1/sc22/wg14/www/projects has a later draft, N2596, dated December 11, 2020. It has the text corrected, with roundTiesToAway
inserted where it belongs:
The macros (7.6) FE_DOWNWARD , FE_TONEAREST , FE_TONEARESTFROMZERO , FE_TOWARDZERO , and FE_UPWARD , which are used in conjunction with the fegetroundand fesetroundfunctions and the FENV_ROUND pragma, represent the IEC 60559 rounding-direction attributes roundTowardNegative, roundTiesToEven, roundTiesToAway, roundTowardZero, and roundTowardPositive, respectively, for binary floating-point arithmetic. Support for the roundTiesToAway attribute for binary floating- point arithmetic, and hence for the FE_TONEARESTFROMZERO macro, is optional.
It seems clear that this was just an editing error.