C++ Logo

std-proposals

Advanced search

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

From: Frederick Virchanza Gotham <cauldwell.thomas_at_[hidden]>
Date: Wed, 29 Mar 2023 10:21:25 +0100
On Wed, Mar 29, 2023 at 10:01 AM Jonathan Wakely <cxx_at_[hidden]> wrote:
>
>> It doesn't matter if you're from another planet, or if your first
>> language isn't English, the type '__uint128_t' is an integer type. If
>> the C++ Standard, or if any given C++ compiler, doesn't recognise it
>> as an integer type, then that's a totally different issue.
>
>
> Then take the discussion somewhere else, this list is about the C++ standard.


The point I'm making is relevant.


> By definition, there are no integral types wider than uintmax_t, so if __int128 is wider than uintmax_t, it's not an integral type.


Every once in a while I'm reminded that I have my own personal variety
on the human condition, and that there are sane rational people in the
world who form totally different views than I do when presented with
the same evidence. You and I see the world differently, and that's
okay. So maybe let's try to find a middle ground.

Are you saying that the C++ Standard's definition of 'integer' (or
'integral') is different from how a computer scientist or a
mathematician would understand it?

Do we really want the C++ Standard to redefine English language
scientific terms?

__uint128_t is a type. I think we agree on this point.
__uint128_t holds an integer. I think we also agree on this second point.
__uint128_t is an integer type. This seems to be where we disagree.

There isn't anything about the standard of any programming language
that makes __uint128_t any more or any less of an integer type.

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

Things start getting a bit hairy when you allow the redefining of
simple English words. Back when I was a teenager, the word 'cash'
meant money in the form of coins and paper, but it seems nowadays
'cash' means any money that is readily accessible. Of course human
languages evolve over time; the English bible from the 1600's uses
some words in some really strange ways, and the meaning of a term
creeps as the years and decades go by -- but there isn't any stretch
of the imagination by which __uint128_t isn't a type that holds an
integer (i.e.an integer type).

Received on 2023-03-29 09:21:37