Index: libcfa/src/bits/random.hfa
===================================================================
--- libcfa/src/bits/random.hfa	(revision 12b006c42c66ef5cdeba312c8b20266b72c84df5)
+++ libcfa/src/bits/random.hfa	(revision d30e3ebfc2de91ddf2b472e0097ef737bb4f3654)
@@ -10,6 +10,6 @@
 // Created On       : Fri Jan 14 07:18:11 2022
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Mon Mar 20 10:01:40 2023
-// Update Count     : 180
+// Last Modified On : Mon Mar 20 21:45:24 2023
+// Update Count     : 186
 // 
 
@@ -131,9 +131,9 @@
 #ifdef __cforall										// don't include in C code (invoke.h)
 
-// Splitmix64
 // https://rosettacode.org/wiki/Pseudo-random_numbers/Splitmix64
-// Splitmix64 is not recommended for demanding random number requirements,
-// but is often used to calculate initial states for other more complex
-// pseudo-random number generators.                              
+//
+// Splitmix64 is not recommended for demanding random number requirements, but is often used to calculate initial states
+// for other more complex pseudo-random number generators (see https://prng.di.unimi.it).
+// Also https://rosettacode.org/wiki/Pseudo-random_numbers/Splitmix64.
 static inline uint64_t splitmix64( uint64_t & state ) {
     state += 0x9e3779b97f4a7c15;
@@ -149,10 +149,9 @@
 } // splitmix64_set_seed
 
-// Splitmix32
 // https://github.com/bryc/code/blob/master/jshash/PRNGs.md#splitmix32
-// Splitmix32 is not recommended for demanding random number requirements,
-// but is often used to calculate initial states for other more complex
-// pseudo-random number generators.
-// SplitMix32 is a 32 bit variant of Splitmix64
+//
+// Splitmix32 is not recommended for demanding random number requirements, but is often used to calculate initial states
+// for other more complex pseudo-random number generators (see https://prng.di.unimi.it).
+
 static inline uint32_t splitmix32( uint32_t & state ) {
     state += 0x9e3779b9;
@@ -169,28 +168,31 @@
 
 #ifdef __SIZEOF_INT128__
-	//--------------------------------------------------
-	static inline uint64_t lehmer64( __uint128_t & state ) {
-		__uint128_t ret = state;
-		state *= 0x_da94_2042_e4dd_58b5;
-		return ret >> 64;
-	} // lehmer64
-
-	static inline void lehmer64_set_seed( __uint128_t & state, uint64_t seed ) {
-		// The seed needs to be coprime with the 2^64 modulus to get the largest period, so no factors of 2 in the seed.
-		state = seed;
-		lehmer64( state );								// prime
-	} // lehmer64_set_seed
-
-	//--------------------------------------------------
-	static inline uint64_t wyhash64( uint64_t & state ) {
-		uint64_t ret = state;
-		state += 0x_60be_e2be_e120_fc15;
-		__uint128_t tmp;
-		tmp = (__uint128_t) ret * 0x_a3b1_9535_4a39_b70d;
-		uint64_t m1 = (tmp >> 64) ^ tmp;
-		tmp = (__uint128_t)m1 * 0x_1b03_7387_12fa_d5c9;
-		uint64_t m2 = (tmp >> 64) ^ tmp;
-		return m2;
-	} // wyhash64
+//--------------------------------------------------
+static inline uint64_t lehmer64( __uint128_t & state ) {
+	__uint128_t ret = state;
+	state *= 0x_da94_2042_e4dd_58b5;
+	return ret >> 64;
+} // lehmer64
+
+static inline void lehmer64_set_seed( __uint128_t & state, uint64_t seed ) {
+	// The seed needs to be coprime with the 2^64 modulus to get the largest period, so no factors of 2 in the seed.
+	state = splitmix64( seed );							// prime
+} // lehmer64_set_seed
+
+//--------------------------------------------------
+static inline uint64_t wyhash64( uint64_t & state ) {
+	uint64_t ret = state;
+	state += 0x_60be_e2be_e120_fc15;
+	__uint128_t tmp;
+	tmp = (__uint128_t) ret * 0x_a3b1_9535_4a39_b70d;
+	uint64_t m1 = (tmp >> 64) ^ tmp;
+	tmp = (__uint128_t)m1 * 0x_1b03_7387_12fa_d5c9;
+	uint64_t m2 = (tmp >> 64) ^ tmp;
+	return m2;
+} // wyhash64
+
+static inline void wyhash64_set_seed( uint64_t & state, uint64_t seed ) {
+	state = splitmix64( seed );							// prime
+} // wyhash64_set_seed
 #endif // __SIZEOF_INT128__
 
@@ -227,13 +229,10 @@
 
 static inline void xoshiro256pp_set_seed( xoshiro256pp_t & state, uint64_t seed ) {
-    // these are done explicitly in this order to attain repeatable seeding.
-    // do not call splitmix64 directly in the state init since order of argument evaluation
-    // may not be consistent leading to irreproducible seeding
-    uint64_t seed1 = splitmix64( seed );
+    // To attain repeatable seeding, compute seeds separately because the order of argument evaluation is undefined.
+    uint64_t seed1 = splitmix64( seed );				// prime
     uint64_t seed2 = splitmix64( seed );
     uint64_t seed3 = splitmix64( seed );
     uint64_t seed4 = splitmix64( seed );
 	state = (xoshiro256pp_t){ seed1, seed2, seed3, seed4 };
-	xoshiro256pp( state );								// prime
 } // xoshiro256pp_set_seed
 
@@ -269,13 +268,10 @@
 
 static inline void xoshiro128pp_set_seed( xoshiro128pp_t & state, uint32_t seed ) {
-    // these are done explicitly in this order to attain repeatable seeding.
-    // do not call splitmix32 directly in the state init since order of argument evaluation
-    // may not be consistent leading to irreproducible seeding
-    uint32_t seed1 = splitmix32( seed );
+    // To attain repeatable seeding, compute seeds separately because the order of argument evaluation is undefined.
+    uint32_t seed1 = splitmix32( seed );				// prime
     uint32_t seed2 = splitmix32( seed );
     uint32_t seed3 = splitmix32( seed );
     uint32_t seed4 = splitmix32( seed );
 	state = (xoshiro128pp_t){ seed1, seed2, seed3, seed4 };
-	xoshiro128pp( state );								// prime
 } // xoshiro128pp_set_seed
 
@@ -290,6 +286,5 @@
 
 static inline void xorshift_13_7_17_set_seed( uint64_t & state, uint64_t seed ) {
-	state = seed;
-	xorshift_13_7_17( state );							// prime
+	state = splitmix64( seed );							// prime
 } // xorshift_13_7_17_set_seed
 
@@ -308,6 +303,5 @@
 
 static inline void xorshift_6_21_7_set_seed( uint32_t & state, uint32_t seed ) {
-	state = seed;
-	xorshift_6_21_7( state );							// prime
+    state = splitmix32( seed );							// prime
 } // xorshift_6_21_7_set_seed
 
@@ -323,6 +317,5 @@
 
 static inline void xorshift_12_25_27_set_seed( uint64_t & state, uint64_t seed ) {
-	state = seed;
-	xorshift_12_25_27( state );							// prime
+	state = splitmix64( seed );							// prime
 } // xorshift_12_25_27_set_seed
 
@@ -345,6 +338,5 @@
 
 static inline void kiss_64_set_seed( kiss_64_t & rs, uint64_t seed ) with(rs) {
-	z = 1; w = 1; jsr = 4; jcong = seed;
-	kiss_64( rs );										// prime
+	z = 1; w = 1; jsr = 4; jcong = splitmix64( seed );	// prime
 } // kiss_64_set_seed
 
@@ -374,13 +366,10 @@
 
 static inline void xorwow_set_seed( xorwow_t & rs, uint32_t seed ) {
-    // these are done explicitly in this order to attain repeatable seeding.
-    // do not call splitmix32 directly in the state init since order of argument evaluation
-    // may not be consistent leading to irreproducible seeding
-    uint32_t seed1 = splitmix32( seed );
+    // To attain repeatable seeding, compute seeds separately because the order of argument evaluation is undefined.
+    uint32_t seed1 = splitmix32( seed );				// prime
     uint32_t seed2 = splitmix32( seed );
     uint32_t seed3 = splitmix32( seed );
     uint32_t seed4 = splitmix32( seed );
 	rs = (xorwow_t){ seed1, seed2, seed3, seed4, 0 };
-	xorwow( rs );										// prime
 } // xorwow_set_seed
 
@@ -388,6 +377,6 @@
 // Used in __tls_rand_fwd
 #define M  (1_l64u << 48_l64u)
-#define A  (25214903917_l64u)
-#define AI (18446708753438544741_l64u)
+#define A  (25_214_903_917_l64u)
+#define AI (18_446_708_753_438_544_741_l64u)
 #define C  (11_l64u)
 #define D  (16_l64u)
