[Cfp-interest 1653] AI about roundTiesToAway

Jim Thomas jaswthomas at sbcglobal.net
Sat Jun 20 16:38:37 PDT 2020


Action item:
> Email: CFP 1643: Rnd ties away issue.
> AI: Jim: rewrite.


In CFP 1643, Paul Zimmermann reported an editorial problem in C2X draft N2478 in F.3 #9. Paul is correct and we need to make the change he suggests.

Also, IEC 60559 uses the same rounding attribute names for binary and decimal. For C the corresponding macro names need to be different, because the requirements for which must be defined are different for binary and decimal. I think this paragraph (#9) and the corresponding one for decimal (#19) should be explicit about whether the macros apply to binary or decimal floating-point arithmetic.

Finally, #9 mentions the use of the macros by the FENV_ROUND pragma. The analogous words should be in #19 for the FENV_DEC_ROUND pragma.  

The following changes address these three editorial issues:

Change F.3#9::

[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.

to:

[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, 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.

 And change F.3#19:

[19]The fe_dec_getround (7.6.5.3) and fe_dec_setround (7.6.5.6) functions provide the getDecimalRoundingDirection and setDecimalRoundingDirection operations defined in IEC 60559 for decimal floating-point arithmetic. The macros (7.6) FE_DEC_DOWNWARD, FE_DEC_TONEAREST, FE_DEC_TONEARESTFROMZERO, FE_DEC_TOWARDZERO, and FE_DEC_UPWARD, which are used in conjunction with the fe_dec_getround and fe_dec_setround functions, represent the IEC 60559 rounding-direction attributes roundTowardNegative, roundTiesToEven, roundTiesToAway, roundTowardZero, and roundTowardPositive, respectively.

to:

[19]The fe_dec_getround (7.6.5.3) and fe_dec_setround (7.6.5.6) functions provide the getDecimalRoundingDirection and setDecimalRoundingDirection operations defined in IEC 60559 for decimal floating-point arithmetic. The macros (7.6) FE_DEC_DOWNWARD, FE_DEC_TONEAREST, FE_DEC_TONEARESTFROMZERO, FE_DEC_TOWARDZERO, and FE_DEC_UPWARD, which are used in conjunction with the fe_dec_getround and fe_dec_setround functions and the FENV_DEC_ROUND pragma, represent the IEC 60559 rounding-direction attributes roundTowardNegative, roundTiesToEven, roundTiesToAway, roundTowardZero, and roundTowardPositive, respectively, for decimal floating-point arithmetic.


- Jim Thomas

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


More information about the Cfp-interest mailing list