[Cfp-interest] Three round nearest modes and FLT_ROUNDS

Fred J. Tydeman tydeman at tybor.com
Tue Oct 23 14:36:09 PDT 2018


On Tue, 23 Oct 2018 12:06:37 -0700 Jim Thomas wrote:
>
>My understanding is that 754-2019 does not intend for roundTiesToZero to be a new user selectable rounding direction. 

Agreed.

>C 7.31.4 already reserves the names with an FE_ prefix, so the names would be available if a future revision of 754 added a user selectable rounding direction. It wouldn't be appropriate for C to get in front of 754 on this.

I was not clear.  There is no requirement that anyone support TiesToZero for
anything other than the augmented operations.  Therefore, there is no
requirement that any implementations define FE_TONEARESTTOZERO.
However, if an implementation were to define such a user selectable 
rounding mode, I am asking that we specify the spelling of it now.

The other issue is:

Given that there could be multiple different meanings for Round to Nearest,
what should FLT_ROUNDS be?  Should FLT_ROUNDS have a value 
for each of the possible FE_* rounding macros?  Should there be a
one-to-one mapping between FLT_ROUNDS and the FE_* rounding modes?



---
Fred J. Tydeman        Tydeman Consulting
tydeman at tybor.com      Testing, numerics, programming
+1 (702) 608-6093      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