Liste des Groupes | Revenir à cl c |
On 07/04/2025 19:12, Michael S wrote:I remember reading a proposal to generalise the C integer type names, allowing for things like "short long int" for 24-bit, "short short short int" for 4-bit, and so on. It was not accepted into the standards - perhaps because of the date (first of April).On Mon, 7 Apr 2025 19:02:34 +0100Yes. The British use
bart <bc@freeuk.com> 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?
Try 20 * BILLION; it will overflow if not careful.
>
I'd normally write '20 billion' outside of C, since I use such
numbers, with lots of zeros, constantly when writing test code.
>
But when it isn't all zeros, or the base isn't 10, then numeric
separators are better.
>
Is not it "20 milliards" in British English?
1 - one
10 - ten
100 - hundred
1 000 - thousand
10 000 - myriad
100 000 - pool
1 000 000 - million
1 000 000 000 - milliard
1 000 000 000 000 - billion
1 000 000 000 000 000 - billiard
1 000 000 000 000 000 000 - trillion
1 000 000 000 000 000 000 000 - trilliard
1 000 000 000 000 000 000 000 000 - snooker
except for journalists, politicians, stockbrokers, and anyone else who spends far too much time talking to Americans.
The biggest number you're likely to need in the real world is 100 tredecimillion, which is approximately the number of atoms in the known universe.
ObC: I am currently roughing out a proposal for the ISO folks to introduce the 288-bit long long long long long long long long long int, or universe_t for short, so that programs will be able to keep track of those 100 tredecimillion atoms. Each universe_t will be able to count atoms in almost five million observable universes, which should be enough to be going on with.
Les messages affichés proviennent d'usenet.