Talk:Pseudo-random numbers/PCG32

From Rosetta Code

seed_sequence is completely unused

I get the exact same output from the python code after removing all references to it. --Pete Lomax (talk) 00:53, 12 August 2020 (UTC)

Er, that's because it's wrong. Fixing...
--Paddy3118 (talk) 04:59, 12 August 2020 (UTC)
... Fixed.
self.inc in method seed should have updated from argument seed_sequence.
Thanks Pete :-)
--Paddy3118 (talk) 05:19, 12 August 2020 (UTC)

Inappropriate masks?

Python does not have an unsigned 64 bit integer type or an unsigned 32 bit integer type. It has an integer type whose size varies to accept its operators, and where appropriate, leading zeroes are dropped.

Most of these bit-twizzling algorithms are originally written in languages like C that have these types. To duplicate the calculations, the Python example may use 32 bit and 64 bit mask values. anding a value with them will truncate that value to a maximum of 32/64 bits.

Fpr languages with these types, this would not be an idiomatic solution. Please use those types if they are a part of your language rather than follow the Python masking route, thanks. --Paddy3118 (talk) 11:00, 13 August 2020 (UTC)