🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.c
Article #931

Re: .5 against 0.5f

#931
From: David Brown
Date: Wed, 28 Oct 2026 07:45
32 lines
2653 bytes
On 28/10/2026 02:41, James Kuyper wrote:
> On 2026-10-27 20:49, Lawrence D’Oliveiro wrote:
>> On Tue, 27 Oct 2026 18:06:25 -0400, James Kuyper wrote:
>>
>>> However, if you need double precision, you shouldn't be using the
>>> "f" suffix.
>>
>> Is there any situation where you *should* use the “f” suffix?
>>
>> I am thinking: no.
> 
> I've used systems where float was significantly faster than double, I
> wouldn't be surprised if someone claimed that this no longer the case on
> any modern machine, but I would be surprised if they had done a
> sufficiently careful search to justify being certain about that.
> 

If they were certain about it, then they certainly would not have done a 
careful enough search.

> I've seen applications where the lower precision of float was
> acceptable, and the extra speed of float was essential to meeting speed
> requirements.

People use 16-bit and 8-bit floating point formats too.  I expect that 
these days, most floating point calculations executed across the world 
are 8 bit.

Once you have enough precision that your calculations are accurate 
enough for your required application, there's little point in using 
bigger formats - especially if speed is relevant.
Technical Details
Message-ID: <11bs97j$26dq0$2@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> <11brjrn$21vfh$1@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: Wed, 28 Oct 2026 08:45:55 +0100
Organization: A noiseless patient Spider
Lines: 32
Message-ID: <11bs97j$26dq0$2@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> <11brjrn$21vfh$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 28 Oct 2026 07:45:56 +0000 (UTC)
Injection-Info: dont-email.me;
	logging-data="2307904"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX1+n5+1pdMhLXZt9WO5HHe4gO6tPpksZaVA="; posting-host="7742015709800b6389fefe24fb6a2b50"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:ahSLwrXy5g8XpxBJqgqOZWPlCkg= sha256:xv4eUSrRYfLWMA5oBhhVSMGhSpqNziFWuRkGXwd4swU=
	sha1:To3W8XGBhZuRjoBYyw+cZsabURs= sha256:90RVPNdFZomDLasOw7V+To5wrYRjWxYV/Sg9hKy5x4Q=
Content-Language: en-GB, nb-NO
In-Reply-To: <11brjrn$21vfh$1@dont-email.me>