🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.c
Article #1170

Re: .5 against 0.5f

#1170
From: David Brown
Date: Fri, 30 Oct 2026 14:25
168 lines
9086 bytes
On 30/10/2026 14:54, Janis Papanagnou wrote:
> On 2026-10-30 09:11, David Brown wrote:
>> On 30/10/2026 04:38, Janis Papanagnou wrote:
>>> On 2026-10-30 00:56, Keith Thompson wrote:
>>>> Tim Rentsch <tr.17687@z991.linuxsc.com> writes:
>>>>> Janis Papanagnou <janis_papanagnou+ng@hotmail.com> writes:
>>>>>> Note: my argumentation is based on questioning the existence of 'F'.
>>>>>> So I'd appreciate to hear of any enlightening application cases, ones
>>>>>> that would be impossible when 'F' in literals wouldn't be present.
>>>>>
>>>>> In C the word is constants, not literals.
>>>>
>>>> For now.  In the latest C2y draft, they're called literals.
>>>>
>>>> Proposal:       https://www.open-std.org/jtc1/sc22/wg14/www/docs/ 
>>>> n3189.htm
>>>> Draft standard: https://www.open-std.org/jtc1/sc22/wg14/www/docs/ 
>>>> n3998.pdf
>>>>
>>>> (You've said before that you dislike this change.)
>>>>
>>>> In any case, the term "literal" is unambiguous, even if it's not
>>>> currently used by the C standard.
>>>
>>> Thanks for answering him. (As I'm yet again ignoring him I wouldn't
>>> have noticed his statement.)
>>>
>>> For other readers I remind that I'm not necessarily using C-standard
>>> terms if there's terms common in CS existing that either appear more
>>> appropriately describing things, or if I'm generalizing facts beyond
>>> "C".
>>
>> The preference should be to use the C standard terms in this group - or
> 
> Like there's no CLC coding style (as recently demanded and rebutted)

Agreed.

> it's also, IMO, presumptuous to demand posters to use terms defined
> in the C-standards documents. 

"Demand" is far too strong a word.  It is not presumptuous or onerous to 
/prefer/ standard terms for a given language in a language-specific 
Usenet group.  Discussing what is and is not supported and required by 
the C standards is par for the course in comp.lang.c, and understanding 
the standard terms is an important part of that.  We don't need to be 
obsessive about it unless it is an important detail of the issue being 
discussed, as long things are clear enough.

> Moreover, as I recently learned, even
> the standard-C documents seem to adjust their terminology.

This has happened /once/, in the space of about 40 years.  It's not as 
if they change terms on a regular basis!

> 
> As I explained already, I'm using the terms that appear to me to be
> most appropriate to describe things. In cases where there's multiple
> options I'm gladly using the terms preferred in the C-standard docs,
> given that I know them.

Fair enough.  The important thing, as I see it, is that people in a 
discussion know what each other is talking about.

> 
> I certainly consider it presumptuous to demand from posters to read
> (all or every new version of) the C-standard to talk about "C".

I would certainly agree on that, and I don't think anyone has made such 
demands.

> 
>> to add brief comments for clarity.  (Sometimes it is also worth adding 
>> comments for clarity even when using C standard terms.)  The C 
>> standard uses terms like "object" and "byte" in a way that is unusual 
>> in the wider scope of computer science.  But sometimes computer 
>> science courses use different terms, as do different programming 
>> languages and different parts of the world, and things change over 
>> time - often there is no single "standard CS" term, and often there is 
>> no fixed definition of a term commonly used in computer science. 
> 
> That's all correct.
> 
> As I mentioned elsewhere already - I think also in a reply to a post
> of yours, about the same topic - I'm gladly explaining (if necessary)
> not only every word in my posts that are unclear to you but also the
> implied semantics if necessary.

You tend to write very clearly - it's a rarity that your posts are 
misunderstood, I think.

> 
> (Mind that, as opposed to you and some others, while you may do that,
> I'm *not* discussing the _C-standard_ here. You should make yourself
> clear that there's a difference between talking about all aspects of
> the language or exchange specifically about the formal aspects of "C".
> What makes perfectly sense for the former group is, to say the least,
> arguable for the general, non-specialized disputants.)

It is certainly the case that there are times when detailed 
consideration of the exact language and terms of the standards are 
important to the discussion, and plenty of times when they are not.  I 
have nothing against loser language when loser language is easier to use 
for the point at hand.

> 
>> Many of the terms used in the C standard have the strong advantage of 
>> having specific definitions given in the standard itself.
> 
> Fine.
> 
>>
>> If in doubt, being a little extra explicit is better than being 
>> misunderstood!
> 
> No doubt.
> 
>>
>> In the particular case of "constant", I think the root issue is that 
>> the word is overused.  "integer constant" and "integer constant 
>> expression" 
> 
> I think in the post you are referring to I described a different thing;
> I spoke about a constant literal. And the (IMO unnecessary) dispute had
> been about "literal" not about "constant". - And we heard that "literal"
> is even the new term used in the (draft) C-standard!
> 

I am not sure if I was referring to a particular post - and I am not 
sure if there was a "dispute" at all (unless you count Tim's post). 
It's okay for someone to comment on the term used in the C standard 
without it implying that your post was wrong to use a different term.

In this particular case, I personally prefer "literal" to "constant". 
It's the term used in the C2y draft, it is also used in the C++ 
standards, and consistent with current C standards use of "string 
literals" and "compound literals".  But it can also be useful for people 
to know that "integer constant" is the term for 123 in current C, not 
"integer literal".  One use of that knowledge is if people want to look 
up more information on quality reference sites (like cppreference.com) 
or in the standards themselves - it's easier if you know the standard 
terms.  If you want to know the exact rules for "integer constants", and 
try to search the standards for "integer literal", you'll find no hits 
except, bizarrely, a mention of "binary integer literals" in the list of 
changes to standards versions.

>> [snip digressions about "integer constant" and "constant expressions"]
>> [snip more digressions on early C-"constants"]
> 
>> [...]  C++ has called 123 an "integer literal" for ages, and it makes 
>> sense for C to follow suit.
> 
> Yes, and I agree with that choice. (I'm using the word "literal" for all
> programming languages if I want to talk about literals.)
> 
>>
>> I doubt if this is the start of a habit or pattern, however.
> 
> I think it's pointless to make guesses. (I'm certainly continuing to
> use those terms that I think are best fitting. And if you (or others)
> have problems understanding them I'm gladly explaining them, as said.
> Especially since I think the time spent on an explanation of a good
> term is much better spent than the time wasted for a discussion like
> the one you restarted here yet another time.)
> 
> Janis
> 
Technical Details
Message-ID: <11c29cu$alhk$1@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-mail
References: <11bpvs7$1e6kc$2@dont-email.me> <11bqnvh$1np7s$1@dont-email.me> <11br5td$1to7l$1@dont-email.me> <11br792$1u7e5$1@dont-email.me> <11brgqf$21170$2@dont-email.me> <11brir0$1uh9q$4@kst.eternal-september.org> <11bt4ua$139ta$8@dont-email.me> <11btlrl$2ojn1$1@kst.eternal-september.org> <11btv9c$139ta$12@dont-email.me> <86wlr0kzqc.fsf@linuxsc.com> <11c0mfg$3pmvb$4@kst.eternal-september.org> <11c13eq$2t866$6@dont-email.me> <11c1jg6$2kc6$1@dont-email.me> <11c27j3$2t866$10@dont-email.me>

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: Fri, 30 Oct 2026 15:25:33 +0100
Organization: A noiseless patient Spider
Lines: 168
Message-ID: <11c29cu$alhk$1@dont-email.me>
References: <11bpvs7$1e6kc$2@dont-email.me> <11bqnvh$1np7s$1@dont-email.me>
 <11br5td$1to7l$1@dont-email.me> <11br792$1u7e5$1@dont-email.me>
 <11brgqf$21170$2@dont-email.me> <11brir0$1uh9q$4@kst.eternal-september.org>
 <11bt4ua$139ta$8@dont-email.me> <11btlrl$2ojn1$1@kst.eternal-september.org>
 <11btv9c$139ta$12@dont-email.me> <86wlr0kzqc.fsf@linuxsc.com>
 <11c0mfg$3pmvb$4@kst.eternal-september.org> <11c13eq$2t866$6@dont-email.me>
 <11c1jg6$2kc6$1@dont-email.me> <11c27j3$2t866$10@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 30 Oct 2026 14:25:35 +0000 (UTC)
Injection-Info: dont-email.me;
	logging-data="349748"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX1/g7a4GjAygcvmkV2YtgHfYLlnE/nP8Yis="; posting-host="005feb7eca873ed1ea966324157898e1"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:aqm/6yslDuDfh6x8mz5KUzlGNrE= sha256:vgQ+JefH8xU6HpCe+xu+VlcdZrYpnd5JZZrHqBhPZQI=
	sha1:TD/yqLWl6OHIDwHmWc9TllsJ2/Q= sha256:9Zw84H7AAk2wCkF1oWuCKWJetBwSyyAQaVLo8U5B1xg=
Content-Language: en-GB, nb-NO
In-Reply-To: <11c27j3$2t866$10@dont-email.me>