C++ Logo


Advanced search

Re: [std-proposals] Slow bulky integer types (128-bit)

From: Giuseppe D'Angelo <giuseppe.dangelo_at_[hidden]>
Date: Wed, 29 Mar 2023 12:03:04 +0200
Il 29/03/23 11:21, Frederick Virchanza Gotham via Std-Proposals ha scritto:
> Now if you want to say that the C++ Standard has a finite list of
> types that it considers to fall into the category of "integer types",
> and if you're saying that __uint128_t isn't on that list, then that
> just doesn't makes sense. It would only make sense if one of the two
> following actions were taken:
> (1) The C++ Standard gives a definition of 'integer/integral' contrary
> to how the term is understood by computer scientists and
> mathematicians
> (2) The C++ Standard uses a term other than 'integer/integral' to
> denote these types

What has this to do with pure sciences? Where's my 94214-bit integral
type in ones' complement then? I'm pretty sure I can define it

Instead, the list is based on engineering considerations (something
something "things that map to hardware concepts" something something).

One may even disagree on the list entirely, with arguments such as
"what's the usefulness of `short int`? You can't rely on its width; use
int16_t if you need 16 bits" and the like.

But that doesn't change the reality of things that, as far as the
Standard is concerned, __int128 isn't an integer type. And GCC, as an
implementation of the Standard, says it's not an integer type either.

> https://eel.is/c++draft/basic.fundamental#1

> https://gcc.gnu.org/onlinedocs/gcc/Integers-implementation.html

My 2 c,

Giuseppe D'Angelo

Received on 2023-03-29 10:03:07