Article View: comp.lang.c
Article #934Re: .5 against 0.5f
From: David Brown
Date: Wed, 28 Oct 2026 07:56
Date: Wed, 28 Oct 2026 07:56
27 lines
2693 bytes
2693 bytes
On 27/10/2026 23:53, Keith Thompson wrote: > James Kuyper <jameskuyper@alumni.caltech.edu> writes: > [...] >> The C constant "0.1" implicitly has a double value. It has "either the >> nearest representable value" to exactly 0.1, "or the larger or smaller >> representable value immediately adjacent to the nearest representable >> value, chosen in an implementation-defined >> manner." (6.5.4.3p4). Since it's double precision constant, >> "representable" means "representable as a double precision number". > > I think you gave the wrong subsection number, and you didn't specify > which version of the standard you're quoting from. 6.5.4.3 is > "Unary arithmetic operators" in the current standard, though it > may be different in different editions. The wording you quoted > is from 6.4.4.3p4 in N3220 (C23). > > (I'd like the C standard to adopt named subsections, as used in > the C++ standard.) > Section numbering in the C standards was fine until C23 - from C90 to C17, almost all changes added new numbered sections without changing the existing ones. But C23 had too many changes, and some things were renumbered. So I /was/ happy with numbered, rather than named, sections. Going forward, however, I agree with you - named subsections seem the best choice for consistent references.
Technical Details
Message-ID:
<11bs9qs$26dq0$3@dont-email.me>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mailReferences:
<11bpvs7$1e6kc$2@dont-email.me> <11bqnvh$1np7s$1@dont-email.me> <11br5td$1to7l$1@dont-email.me> <11bra0u$1uh9q$2@kst.eternal-september.org>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail From: David Brown <david.brown@hesbynett.no> Newsgroups: comp.lang.c Subject: Re: .5 against 0.5f Date: Wed, 28 Oct 2026 08:56:12 +0100 Organization: A noiseless patient Spider Lines: 27 Message-ID: <11bs9qs$26dq0$3@dont-email.me> References: <11bpvs7$1e6kc$2@dont-email.me> <11bqnvh$1np7s$1@dont-email.me> <11br5td$1to7l$1@dont-email.me> <11bra0u$1uh9q$2@kst.eternal-september.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Wed, 28 Oct 2026 07:56:13 +0000 (UTC) Injection-Info: dont-email.me; logging-data="2307904"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19AL2V4nu1i1GeF7sGZei5o+41hHsPlF4c="; posting-host="7742015709800b6389fefe24fb6a2b50" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:kFV/QKgksKt3PMfMOwWZBVx8dN8= sha256:AblalF+zcdZrnxCvaQMYPHSm9+F1/OoPV/8+cmclZmc= sha1:tF4HkjAB4RTvHEcZir373+bVIuA= sha256:hDkON0iLqYlV1uu9sJY+rbZjWaeeaQI4f7NLRiNsJg8= In-Reply-To: <11bra0u$1uh9q$2@kst.eternal-september.org> Content-Language: en-GB, nb-NO