C++ Logo

std-proposals

Advanced search

Re: [std-proposals] D4037R0 Allowing signed char and unsigned char in random number generation

From: Jan Schultke <janschultke_at_[hidden]>
Date: Thu, 26 Feb 2026 21:26:12 +0100
>
> How are 8-bit versions of "such things" expected to perform on
> statistical tests for randomness?
>

Exactly as specified in the standard? For generators, I'm pretty sure it's
specified mathematically what they produce with perfect clarity.

For distributions, I don't believe we have such a precise specification.
You could look at the existing implementations in libc++ and libstdc++ if
you really wanted to know. I don't see any innate reason why they would be
of lower or greater statistical quality than the distributions for other
unsigned integers.

Received on 2026-02-26 20:26:28