[Cfp-interest 1944] Fwd: (SC22WG14.19047) Preferred quantum exponent for default-initialized 0
Fred J. Tydeman
tydeman at tybor.com
Wed Mar 10 15:33:57 PST 2021
..................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.
--
Joseph S. Myers
joseph at codesourcery.com
...................End Forwarded Message..................
---
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