Date: Sun, 23 Aug 2026 07:25:26 +0200
Hi,
When working on a draft of P4444 std::big_int (
https://isocpp.org/files/papers/D4444R0.html#std::uint_multiprecision_t),
we've stumbled upon the problem that C++ does not yet have a "word type"
that would be suitable as the "limb type" for multiprecision. That is, the
largest possible unsigned integer type that has native arithmetic support.
For the most part, std::size_t coincidentally has the right size, but e.g.
on WASM32, std::size_t is 32-bit while there are i64 hardware instructions
for arithmetic. Every existing integer type (alias) has the wrong size,
either by design or due to historical reasons.
I'm thus interested in standardizing a type alias in <stdint.h> that has
the size. In P4444, we call that uint_multiprecision_t, but that's perhaps
not universal enough. Names like "uint_maxfast_t" or "uint_word_t" come to
mind.
What are your thoughts? Also, since I'm not in the C committee myself, is
there anyone who is interested in championing a proposal on the WG14 side?
Yours
Jan
When working on a draft of P4444 std::big_int (
https://isocpp.org/files/papers/D4444R0.html#std::uint_multiprecision_t),
we've stumbled upon the problem that C++ does not yet have a "word type"
that would be suitable as the "limb type" for multiprecision. That is, the
largest possible unsigned integer type that has native arithmetic support.
For the most part, std::size_t coincidentally has the right size, but e.g.
on WASM32, std::size_t is 32-bit while there are i64 hardware instructions
for arithmetic. Every existing integer type (alias) has the wrong size,
either by design or due to historical reasons.
I'm thus interested in standardizing a type alias in <stdint.h> that has
the size. In P4444, we call that uint_multiprecision_t, but that's perhaps
not universal enough. Names like "uint_maxfast_t" or "uint_word_t" come to
mind.
What are your thoughts? Also, since I'm not in the C committee myself, is
there anyone who is interested in championing a proposal on the WG14 side?
Yours
Jan
Received on 2026-08-23 05:25:43
