[Cfp-interest 1945] Re: Fwd: (SC22WG14.19047) Preferred quantum exponent for default-initialized 0

Fred J. Tydeman tydeman at tybor.com
Thu Mar 11 20:14:02 PST 2021


On Wed, 10 Mar 2021 13:33:57 -1000 (HST) Fred J. Tydeman wrote:
>
>...................Begin Forwarded Message..................
>
>From: Joseph Myers <joseph at codesourcery.com>
>To: <sc22wg14 at open-std.org>
>Date: Wed, 10 Mar 2021 22:17:15 +0000
>Subject: (SC22WG14.19047) Preferred quantum exponent for default-initialized 0
>
>This is an issue that I've previously mentioned, but in the middle of 
>threads on other subjects so it may have been missed.  Could the 
>floating-point group look at it and come up with a proposal for C23?
>
>The rule (6.7.9#10) that "If an object that has static or thread storage 
>duration is not initialized explicitly, then ... if it has arithmetic 
>type, it is initialized to (positive or unsigned) zero" does not specify 
>the quantum exponent of the result in the decimal floating-point case.
>
>In practice, the default initialization is to representations with all 
>bits 0, and in the IEEE decimal floating-point interchange encodings (both 
>binary and decimal) that's a zero with the least possible quantum 
>exponent.  So I think it would be appropriate for the table of preferred 
>quantum exponents in 5.2.4.2.3 to have an entry added for default 
>initialization, saying the preferred quantum exponent is least possible.
>

Since 754 does not  mention default static initialization, this is not  an errata against 754.
But, it could be on the wish list for the next version of 754.

It should be added C23.



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