Deutsch   English   Français   Italiano  
<vt1l83$n5fs$2@dont-email.me>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail
From: bart <bc@freeuk.com>
Newsgroups: comp.lang.c
Subject: Re: "A diagram of C23 basic types"
Date: Mon, 7 Apr 2025 23:57:08 +0100
Organization: A noiseless patient Spider
Lines: 34
Message-ID: <vt1l83$n5fs$2@dont-email.me>
References: <87y0wjaysg.fsf@gmail.com> <vsj1m8$1f8h2$1@dont-email.me>
 <vsj2l9$1j0as$1@dont-email.me> <vsjef3$1u4nk$1@dont-email.me>
 <vsjg6t$20pdb$1@dont-email.me> <vsjgjn$1v1n4$1@dont-email.me>
 <vsjk4k$24q5m$1@dont-email.me> <vsjlcp$230a5$1@dont-email.me>
 <vsni1v$291i3$5@dont-email.me> <vt13vp$bjs0$1@dont-email.me>
 <20250407211216.00006238@yahoo.com> <vt14u7$bjs0$2@dont-email.me>
 <vt1bmt$jf54$1@dont-email.me> <vt1h48$n5fs$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 08 Apr 2025 00:57:07 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="2f44e72492e5a6a19c1f48ece1af5bd0";
	logging-data="759292"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX1/NZz8+MMPk4wSTHTJGWhpU"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:V0re5tS+8/KiF9e+QPrViDGcw+Q=
Content-Language: en-GB
In-Reply-To: <vt1h48$n5fs$1@dont-email.me>
Bytes: 2782

On 07/04/2025 22:46, bart wrote:

>>>>> On 04/04/2025 04:01, Lawrence D'Oliveiro wrote:
>>>>>> On Wed, 2 Apr 2025 16:33:46 +0100, bart wrote:
>>>>>>> Here, tell me at a glance the magnitude of
>>>>>>> this number:
>>>>>>>
>>>>>>>         10000000000
>>>>>>
>>>>>>        #define THOUSAND 1000
>>>>>>        #define MILLION (THOUSAND * THOUSAND)
>>>>>>        #define BILLION (THOUSAND * MILLION)
>>>>>>
>>>>>>        uint64 num = 10 * BILLION;
>>>>>>
>>>>>> Much easier to figure out, don’t you think?

> (In source code, it would also be useful to use 1e9 or 1e12, 
> unfortunately those normally yield floating point values. I can't do 
> much about that in C, but I will see what can be done with my own stuff.)

Since numbers using exponents without also using decimal points are rare 
in my code base, I've decided to experiment with numbers like 1e6 being 
integer constants rather that floats. (This is IN my language.)

I've done the change in one compiler and will see how well it works. It 
will only be for base 10.

I'd find it useful in C too, but in my compiler, I'd need to find a way 
of making it optional, so that it works that way in programs I write, 
and is conforming for anything else.

(Or I maybe I'll just say to hell with it, and make that change anyway. 
I'm fed up with laboriously counting zeros.)