Talk:Pseudo-random numbers/PCG32: Difference between revisions

Content added Content deleted
mNo edit summary
 
Line 118: Line 118:
--Walter Pachl 20:37, 27 February 2021 (UTC)
--Walter Pachl 20:37, 27 February 2021 (UTC)


I think in the Java program the int type is 32 bits, and Java must give a 32 bit result when shifting a long by an int for whatever arcane Java arithmetic reason -- probably a historical anomaly made to support legacy 32 bit code. --[[User:Wherrera|Wherrera]] ([[User talk:Wherrera|talk]]) 22:14, 27 February 2021 (UTC)
I just tested this in Java 8 (1.8) and the behavior you got only happens with two ints, and the larger number happens if either is a long. --[[User:Wherrera|Wherrera]] ([[User talk:Wherrera|talk]]) 23:42, 27 February 2021 (UTC)