[Cfp-interest 2659] floating constants issue

Jim Thomas jaswthomas at sbcglobal.net
Mon Jan 30 15:19:52 PST 2023


6.4.4.2 #8 says:

All floating constants of the same source form 83) shall convert to the same internal format with the same value.

With the FENV_ROUND and FENV_DEC_ROUND pragmas this is no longer true. For example, 7.6.2 #4 for FENV_ROUND says "Floating constants (6.4.4.2) of a standard floating type that occur in the scope of a constant rounding mode shall be interpreted according to that mode."

This was pointed out in a recent email which I was unable to find. Thanks to the sender.

A fix would be to replace the sentence with something like:

All floating constants of the same source form shall convert to the same internal format. All floating constants of the same source form that are subject to the same translation-time rounding direction (either the default or a rounding direction set by an FENV_ROUND or FENV_DEC_ROUND pragma) shall convert to the same internal format with the same value.

or

All floating constants of the same source form shall convert to the same internal format and, provided they are subject to the same translation-time rounding direction (either the default or a rounding direction set by an FENV_ROUND or FENV_DEC_ROUND pragma), to the same value.

- Jim Thomas

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


More information about the Cfp-interest mailing list