<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;"><div>[Cfp-interest 3079] says</div><blockquote type="cite"><pre style="white-space: pre-wrap; font-variant-ligatures: normal; orphans: 2; widows: 2; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;">On 2024-04-06 15:03:15 -0700, Jim Thomas wrote:
><i> The issues below are represented in Issue 19 in C26D.
</i>><i>
</i>><i> > On Feb 20, 2024, at 8:22 AM, Vincent Lefevre <<a href="http://mailman.oakapple.net/mailman/listinfo/cfp-interest">vincent at vinc17.net</a>> wrote:
</i>><i> >
</i>><i> > On 2024-02-19 09:10:29 -0800, Jim Thomas wrote:
</i>><i> >> The Description for the strtodN function says: "If all subject
</i>><i> >> sequences of hexadecimal form are correctly rounded, …”. I think in
</i>><i> >> context the meaning will be correctly understood as: for these
</i>><i> >> inputs the result delivered by the function is correctly rounded.
</i>><i> >> The Description of wcstodN has the same wording.
</i>><i> >
</i>><i> > Well, this is poor wording. The following is based on N3149.
</i>><i> >
</i>><i> > First, there are some issues in other parts of the text, including
</i>><i> > for strtod, strtof and strtold:
</i>><i> >
</i>><i> > 7.24.1.5p4 says "If the subject sequence has the expected form
</i>><i> > for a floating-point number, the sequence of characters starting
</i>><i> > with the first digit or the decimal-point character [...]", but
</i>><i> > infinities are floating-point numbers.
</i>><i>
</i>><i> > So, for instance, this
</i>><i> > does not make sense for "INF". I think that it should have said
</i>><i> > "finite number" instead of "floating-point number" (note that
</i>><i> > it is not a finite floating-point number before conversion, and
</i>><i> > due to overflow, it may become infinite).
</i>><i> >
</i>><i> > There is the same issue in 7.24.1.6p4 for the strtodN functions.
</i>><i>
</i>><i> Infinities are not floating-point numbers. See 5.2.5.3.3 #3 and #8.
</i>><i> I think either “floating-point number” or “finite number” would be
</i>><i> correct here. The latter seems more direct.
</i>
OK, that's a confusion with IEEE 754, where infinities are
floating-point numbers. </pre></blockquote>Yes, the two standards define the term differently.<br><blockquote type="cite"><pre style="white-space: pre-wrap; font-variant-ligatures: normal; orphans: 2; widows: 2; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;">But the use of "floating-point number" is
incorrect here, because in 5.2.5.3.3, a floating-point number is
restricted to be written in base b with a precision p (not more).
For strtodN, this does not make sense.
</pre></blockquote><div>I think the model can be applied (well enough) to strtodN input, taking b be 10 (for decimal form) or 16 (for hexadecimal form) and the p to be the number of digits in the subject sequence. But I agree “finite number” is a better term here.</div><blockquote type="cite"><pre style="white-space: pre-wrap; font-variant-ligatures: normal; orphans: 2; widows: 2; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;">
But also, note that the standard sometimes says "finite floating-point
number".
</pre></blockquote>There are other places where a redundant qualifier is placed on a term — for emphasis, or to help readers who might misinterpret the unqualified term (whether this is really a help is a separate issue), or because text was added at different times (maybe different decades) with different understandings of the meaning of the terms. <br><blockquote type="cite"><pre style="white-space: pre-wrap; font-variant-ligatures: normal; orphans: 2; widows: 2; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;">
The term "floating-point number" is also used for ceil and floor
(James Kuyper had already pointed this issue in comp.std.c in
August 2021).
</pre></blockquote>This might have been lost. <div><br></div><div>CFP should address these cases (“floating-point number” in strtod, strtodN, ceil, floor) and review the use of “floating-point number” in other cases. This could all be done under Issue 19.</div><div><br></div><div>- Jim Thomas<br><blockquote type="cite"><pre style="white-space: pre-wrap; font-variant-ligatures: normal; orphans: 2; widows: 2; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;">
--
Vincent Lefèvre <<a href="http://mailman.oakapple.net/mailman/listinfo/cfp-interest">vincent at vinc17.net</a>> - Web: <<a href="https://www.vinc17.net/">https://www.vinc17.net/</a>>
100% accessible validated (X)HTML - Blog: <<a href="https://www.vinc17.net/blog/">https://www.vinc17.net/blog/</a>>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)
</pre><br class="Apple-interchange-newline"></blockquote></div></body></html>