🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.c
Article #974

Re: .5 against 0.5f

#974
From: Chris M. Thomasson
Date: Wed, 28 Oct 2026 21:34
25 lines
2375 bytes
On 10/28/2026 12:39 AM, David Brown wrote:
> On 28/10/2026 01: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.
> 
> Try thinking harder.
> 
> I use the "f" suffix all the time in my code, because I do not want 
> double precision.  In many situations, single precision arithmetic is at 
> least twice as fast as double precision - in some situations it can be 
> two orders of magnitude faster.
> 
> 

Same here. I am mostly creating graphics related things. double 
precision in a GPU might not be there. Now, if I am doing something that 
needs higher precision, tends to be with deep zooms or granularity in a 
vector field, then double is okay. But I need to beware that the shaders 
might not support double.
Technical Details
Message-ID: <11btppc$2qhsd$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> <11bs8rb$26dq0$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: "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com>
Newsgroups: comp.lang.c
Subject: Re: .5 against 0.5f
Date: Wed, 28 Oct 2026 14:34:30 -0700
Organization: A noiseless patient Spider
Lines: 25
Message-ID: <11btppc$2qhsd$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> <11bs8rb$26dq0$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 21:34:36 +0000 (UTC)
Injection-Info: dont-email.me;
	logging-data="2967437"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX1832LBxTrDb+FeM3BXHARCTM8UaFpbI9eo="; posting-host="ce22479583babc8631500b8cafa91fe8"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:gyIBKBhHNoKF7bEaNKL7369Z1rM= sha256:LjW1W6cm3DcN/Donbw3qEHp0x+qIAbvQrSz+uBJeads=
	sha1:Izv1hCkSAEmm+12RKXuhQE7ScYU= sha256:xeQQVUPidkrOQ7OU38srvKgUrq0HG/uJyk9YjdVsdBU=
Content-Language: en-US
In-Reply-To: <11bs8rb$26dq0$1@dont-email.me>