Index: libcfa/src/bits/random.hfa
===================================================================
--- libcfa/src/bits/random.hfa	(revision 25b0fde212ca4f2989674f4c453738a67d543323)
+++ libcfa/src/bits/random.hfa	(revision d2ad1518036350cdec12ea05fd951c3f04312459)
@@ -10,6 +10,6 @@
 // Created On       : Fri Jan 14 07:18:11 2022
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Fri Jan 14 07:18:58 2022
-// Update Count     : 1
+// Last Modified On : Sat Nov 19 17:47:43 2022
+// Update Count     : 8
 // 
 
@@ -18,4 +18,10 @@
 #include <stdint.h>
 
+#ifdef __x86_64__										// 64-bit architecture
+#define LEHMER64
+#else													// 32-bit architecture
+#define XORSHIFT_6_21_7
+#endif // __x86_64__
+
 // Pipelined to allow out-of-order overlap with reduced dependencies. Critically, the current random state is returned
 // (copied), and then compute and store the next random value.
@@ -23,4 +29,9 @@
 #if defined(__SIZEOF_INT128__)
 //--------------------------------------------------
+	#ifdef LEHMER64
+	#define PRNG_ARG_T __uint128_t
+	#define PRNG_NAME lehmer64
+	#endif // LEHMER64
+
 	static inline uint64_t lehmer64( __uint128_t & state ) {
 		__uint128_t ret = state;
@@ -51,4 +62,10 @@
 
 //--------------------------------------------------
+
+#ifdef XORSHIFT_6_21_7
+#define PRNG_ARG_T uint32_t
+#define PRNG_NAME xorshift_6_21_7
+#endif // XORSHIFT_6_21_7
+
 static inline uint32_t xorshift_6_21_7( uint32_t & state ) {
 	uint32_t ret = state;
Index: libcfa/src/concurrency/invoke.h
===================================================================
--- libcfa/src/concurrency/invoke.h	(revision 25b0fde212ca4f2989674f4c453738a67d543323)
+++ libcfa/src/concurrency/invoke.h	(revision d2ad1518036350cdec12ea05fd951c3f04312459)
@@ -10,6 +10,6 @@
 // Created On       : Tue Jan 17 12:27:26 2016
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Sun Jan  9 19:06:45 2022
-// Update Count     : 48
+// Last Modified On : Fri Nov 18 12:20:26 2022
+// Update Count     : 49
 //
 
@@ -222,5 +222,5 @@
 		struct processor * last_proc;
 
-		uint32_t random_state;							// fast random numbers
+		__uint128_t random_state;						// fast random numbers
 
 		#if defined( __CFA_WITH_VERIFY__ )
Index: libcfa/src/concurrency/kernel/startup.cfa
===================================================================
--- libcfa/src/concurrency/kernel/startup.cfa	(revision 25b0fde212ca4f2989674f4c453738a67d543323)
+++ libcfa/src/concurrency/kernel/startup.cfa	(revision d2ad1518036350cdec12ea05fd951c3f04312459)
@@ -39,4 +39,5 @@
 #include "limits.hfa"
 #include "math.hfa"
+#include "bits/random.hfa"								// prng
 
 #define CFA_PROCESSOR_USE_MMAP 0
@@ -107,5 +108,6 @@
 extern void __wake_proc(processor *);
 extern int cfa_main_returned;							// from interpose.cfa
-uint32_t __global_random_prime = 4_294_967_291u, __global_random_mask = false;
+PRNG_ARG_T __global_random_prime = 4_294_967_291u;
+bool __global_random_mask = false;
 
 //-----------------------------------------------------------------------------
Index: libcfa/src/concurrency/thread.cfa
===================================================================
--- libcfa/src/concurrency/thread.cfa	(revision 25b0fde212ca4f2989674f4c453738a67d543323)
+++ libcfa/src/concurrency/thread.cfa	(revision d2ad1518036350cdec12ea05fd951c3f04312459)
@@ -10,6 +10,6 @@
 // Created On       : Tue Jan 17 12:27:26 2017
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Sat Feb 12 15:24:18 2022
-// Update Count     : 66
+// Last Modified On : Sun Nov 20 17:17:50 2022
+// Update Count     : 80
 //
 
@@ -26,5 +26,6 @@
 #include "invoke.h"
 
-extern uint32_t __global_random_seed, __global_random_prime, __global_random_mask;
+extern PRNG_ARG_T __global_random_seed, __global_random_prime;
+extern bool __global_random_mask;
 
 #pragma GCC visibility push(default)
@@ -221,17 +222,16 @@
 
 //-----------------------------------------------------------------------------
-#define GENERATOR LCG
-
-void set_seed( uint32_t seed ) {
-	uint32_t & state = active_thread()->random_state;
+
+void set_seed( uint64_t seed ) {
+	PRNG_ARG_T & state = active_thread()->random_state;
 	state = __global_random_seed = seed;
-	GENERATOR( state );
+	(void)PRNG_NAME( state );							// prime PRNG
 	__global_random_prime = state;
 	__global_random_mask = true;
 } // set_seed
 
-uint32_t prng( void ) {									// [0,UINT_MAX]
-	uint32_t & state = active_thread()->random_state;
-	return GENERATOR( state );
+uint64_t prng( void ) {									// [0,UINT_MAX]
+	PRNG_ARG_T & state = active_thread()->random_state;
+	return PRNG_NAME( state );
 } // prng
 
Index: libcfa/src/concurrency/thread.hfa
===================================================================
--- libcfa/src/concurrency/thread.hfa	(revision 25b0fde212ca4f2989674f4c453738a67d543323)
+++ libcfa/src/concurrency/thread.hfa	(revision d2ad1518036350cdec12ea05fd951c3f04312459)
@@ -10,6 +10,6 @@
 // Created On       : Tue Jan 17 12:27:26 2017
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Fri Feb 11 16:34:07 2022
-// Update Count     : 20
+// Last Modified On : Sat Nov 19 16:41:27 2022
+// Update Count     : 30
 //
 
@@ -23,4 +23,5 @@
 #include "monitor.hfa"
 #include "exception.hfa"
+#include "bits/random.hfa"
 
 //-----------------------------------------------------------------------------
@@ -142,11 +143,11 @@
 // prng
 static inline {
-	uint32_t prng( thread$ & th ) __attribute__(( warn_unused_result )) { return LCG( th.random_state ); } // [0,UINT_MAX]
-	uint32_t prng( thread$ & th, uint32_t u ) __attribute__(( warn_unused_result )) { return prng( th ) % u; } // [0,u)
-	uint32_t prng( thread$ & th, uint32_t l, uint32_t u ) __attribute__(( warn_unused_result )) { return prng( th, u - l + 1 ) + l; } // [l,u]
+	uint64_t prng( thread$ & th ) __attribute__(( warn_unused_result )) { return PRNG_NAME( th.random_state ); } // [0,UINT_MAX]
+	uint64_t prng( thread$ & th, uint64_t u ) __attribute__(( warn_unused_result )) { return prng( th ) % u; } // [0,u)
+	uint64_t prng( thread$ & th, uint64_t l, uint64_t u ) __attribute__(( warn_unused_result )) { return prng( th, u - l + 1 ) + l; } // [l,u]
 	forall( T & | is_thread(T) ) {
-		uint32_t prng( T & th ) __attribute__(( warn_unused_result )) { return prng( (thread &)th ); } // [0,UINT_MAX]
-		uint32_t prng( T & th, uint32_t u ) __attribute__(( warn_unused_result )) { return prng( th ) % u; } // [0,u)
-		uint32_t prng( T & th, uint32_t l, uint32_t u ) __attribute__(( warn_unused_result )) { return prng( th, u - l + 1 ) + l; } // [l,u]
+		uint64_t prng( T & th ) __attribute__(( warn_unused_result )) { return prng( (thread &)th ); } // [0,UINT_MAX]
+		uint64_t prng( T & th, uint64_t u ) __attribute__(( warn_unused_result )) { return prng( th ) % u; } // [0,u)
+		uint64_t prng( T & th, uint64_t l, uint64_t u ) __attribute__(( warn_unused_result )) { return prng( th, u - l + 1 ) + l; } // [l,u]
 	} // distribution
 } // distribution
Index: libcfa/src/startup.cfa
===================================================================
--- libcfa/src/startup.cfa	(revision 25b0fde212ca4f2989674f4c453738a67d543323)
+++ libcfa/src/startup.cfa	(revision d2ad1518036350cdec12ea05fd951c3f04312459)
@@ -10,6 +10,6 @@
 // Created On       : Tue Jul 24 16:21:57 2018
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Thu Oct  6 13:51:57 2022
-// Update Count     : 57
+// Last Modified On : Sun Nov 20 21:26:40 2022
+// Update Count     : 59
 //
 
@@ -18,8 +18,9 @@
 #include <stdlib.h>										// getenv
 #include "bits/defs.hfa"								// rdtscl
+#include "bits/random.hfa"								// rdtscl
 #include "startup.hfa"
 
-extern uint32_t __global_random_seed;					// sequential/concurrent
-extern uint32_t __global_random_state;					// sequential
+extern PRNG_ARG_T __global_random_seed;					// sequential/concurrent
+extern PRNG_ARG_T __global_random_state;				// sequential
 
 extern "C" {
Index: libcfa/src/stdlib.cfa
===================================================================
--- libcfa/src/stdlib.cfa	(revision 25b0fde212ca4f2989674f4c453738a67d543323)
+++ libcfa/src/stdlib.cfa	(revision d2ad1518036350cdec12ea05fd951c3f04312459)
@@ -10,6 +10,6 @@
 // Created On       : Thu Jan 28 17:10:29 2016
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Thu Aug 25 22:41:14 2022
-// Update Count     : 604
+// Last Modified On : Sat Nov 19 16:42:26 2022
+// Update Count     : 612
 //
 
@@ -225,15 +225,11 @@
 //---------------------------------------
 
-#define GENERATOR LCG
-
 // would be cool to make hidden but it's needed for libcfathread
-__attribute__((visibility("default"))) uint32_t __global_random_seed;							// sequential/concurrent
-__attribute__((visibility("hidden"))) uint32_t __global_random_state;							// sequential only
-
-void set_seed( PRNG & prng, uint32_t seed_ ) with( prng ) { state = seed = seed_; GENERATOR( state ); } // set seed
-
-void set_seed( uint32_t seed ) { __global_random_state = __global_random_seed = seed; GENERATOR( __global_random_state ); }
-uint32_t get_seed() { return __global_random_seed; }
-uint32_t prng( void ) { return GENERATOR( __global_random_state ); } // [0,UINT_MAX]
+__attribute__((visibility("default"))) PRNG_ARG_T __global_random_seed; // sequential/concurrent
+__attribute__((visibility("hidden"))) PRNG_ARG_T __global_random_state; // sequential only
+
+void set_seed( uint64_t seed ) { __global_random_state = __global_random_seed = seed; PRNG_NAME( __global_random_state ); }
+uint64_t get_seed() { return __global_random_seed; }
+uint64_t prng( void ) { return PRNG_NAME( __global_random_state ); } // [0,UINT_MAX]
 
 //---------------------------------------
Index: libcfa/src/stdlib.hfa
===================================================================
--- libcfa/src/stdlib.hfa	(revision 25b0fde212ca4f2989674f4c453738a67d543323)
+++ libcfa/src/stdlib.hfa	(revision d2ad1518036350cdec12ea05fd951c3f04312459)
@@ -10,6 +10,6 @@
 // Created On       : Thu Jan 28 17:12:35 2016
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Thu Aug 25 18:07:06 2022
-// Update Count     : 645
+// Last Modified On : Sun Nov 20 17:12:37 2022
+// Update Count     : 730
 //
 
@@ -404,19 +404,47 @@
 //   calls( sprng );
 
-struct PRNG {
+trait basic_prng( PRNG &, S, R ) {
+	void set_seed( PRNG & prng, S seed );				// set seed
+	S get_seed( PRNG & prng );							// get seed
+	R prng( PRNG & prng );
+	void ?{}( PRNG & prng );							// random seed
+	void ?{}( PRNG & prng, S seed );					// fixed seed
+}; // basic_prng
+
+static inline forall( PRNG &, S, R | basic_prng( PRNG, S, R ) | { R ?%?( R, R ); } ) {
+	R prng( PRNG & prng, R u ) { return prng( prng ) % u; } // [0,u)
+}
+static inline forall( PRNG &, S, R | basic_prng( PRNG, S, R ) | { R ?+?( R, R ); R ?-?( R, R ); R ?%?( R, R ); void ?{}( R &, one_t ); } ) {
+	R prng( PRNG & prng, R l, R u ) { return prng( prng, u - l + (R){1} ) + l; } // [l,u]
+}
+
+struct PRNG32 {
 	uint32_t callcnt;									// call count
 	uint32_t seed;										// current seed
-	uint32_t state;										// random state
+	PRNG_ARG_T state;									// random state
 }; // PRNG
 
-void set_seed( PRNG & prng, uint32_t seed_ );
-static inline {
-	void ?{}( PRNG & prng ) with( prng ) { callcnt = 0; set_seed( prng, rdtscl() ); } // random seed
-	void ?{}( PRNG & prng, uint32_t seed ) with( prng ) { callcnt = 0; set_seed( prng, seed ); } // fixed seed
-	uint32_t get_seed( PRNG & prng ) __attribute__(( warn_unused_result )) with( prng ) { return seed; } // get seed
-	uint32_t prng( PRNG & prng ) __attribute__(( warn_unused_result )) with( prng ) { callcnt += 1; return LCG( state ); } // [0,UINT_MAX]
-	uint32_t prng( PRNG & prng, uint32_t u ) __attribute__(( warn_unused_result )) { return prng( prng ) % u; } // [0,u)
-	uint32_t prng( PRNG & prng, uint32_t l, uint32_t u ) __attribute__(( warn_unused_result )) { return prng( prng, u - l + 1 ) + l; } // [l,u]
-	uint32_t calls( PRNG & prng ) __attribute__(( warn_unused_result )) with( prng ) { return callcnt; }
+static inline {
+	void set_seed( PRNG32 & prng, uint32_t seed_ ) with( prng ) { state = seed = seed_; PRNG_NAME( state ); } // set seed
+	uint32_t get_seed( PRNG32 & prng ) __attribute__(( warn_unused_result )) with( prng ) { return seed; } // get seed
+	uint32_t prng( PRNG32 & prng ) __attribute__(( warn_unused_result )) with( prng ) { callcnt += 1; return PRNG_NAME( state ); } // [0,UINT_MAX]
+	uint32_t calls( PRNG32 & prng ) __attribute__(( warn_unused_result )) with( prng ) { return callcnt; }
+	void ?{}( PRNG32 & prng ) with( prng ) { callcnt = 0; set_seed( prng, rdtscl() ); } // random seed
+	void ?{}( PRNG32 & prng, uint32_t seed ) with( prng ) { callcnt = 0; set_seed( prng, seed ); } // fixed seed
+} // distribution
+
+struct PRNG64 {
+	uint64_t callcnt;									// call count
+	uint64_t seed;										// current seed
+	PRNG_ARG_T state;									// random state
+}; // PRNG
+
+static inline {
+	void set_seed( PRNG64 & prng, uint64_t seed_ ) with( prng ) { state = seed = seed_; PRNG_NAME( state ); } // set seed
+	uint64_t get_seed( PRNG64 & prng ) __attribute__(( warn_unused_result )) with( prng ) { return seed; } // get seed
+	uint64_t prng( PRNG64 & prng ) __attribute__(( warn_unused_result )) with( prng ) { callcnt += 1; return PRNG_NAME( state ); } // [0,UINT_MAX]
+	uint64_t calls( PRNG64 & prng ) __attribute__(( warn_unused_result )) with( prng ) { return callcnt; }
+	void ?{}( PRNG64 & prng ) with( prng ) { callcnt = 0; set_seed( prng, rdtscl() ); } // random seed
+	void ?{}( PRNG64 & prng, uint64_t seed ) with( prng ) { callcnt = 0; set_seed( prng, seed ); } // fixed seed
 } // distribution
 
@@ -435,10 +463,11 @@
 //   prng( 5, 21 );
 
-void set_seed( uint32_t seed_ ) OPTIONAL_THREAD;
-uint32_t get_seed() __attribute__(( warn_unused_result ));
-uint32_t prng( void ) __attribute__(( warn_unused_result )) OPTIONAL_THREAD; // [0,UINT_MAX]
-static inline {
-	uint32_t prng( uint32_t u ) __attribute__(( warn_unused_result )) { return prng() % u; } // [0,u)
-	uint32_t prng( uint32_t l, uint32_t u ) __attribute__(( warn_unused_result )) { return prng( u - l + 1 ) + l; } // [l,u]
+// Harmonize with concurrency/thread.hfa.
+void set_seed( uint64_t seed_ ) OPTIONAL_THREAD;
+uint64_t get_seed() __attribute__(( warn_unused_result ));
+uint64_t prng( void ) __attribute__(( warn_unused_result )) OPTIONAL_THREAD; // [0,UINT_MAX]
+static inline {
+	uint64_t prng( uint64_t u ) __attribute__(( warn_unused_result )) { return prng() % u; } // [0,u)
+	uint64_t prng( uint64_t l, uint64_t u ) __attribute__(( warn_unused_result )) { return prng( u - l + 1 ) + l; } // [l,u]
 } // distribution
 
Index: sts/.expect/PRNG.txt
===================================================================
--- tests/.expect/PRNG.txt	(revision 25b0fde212ca4f2989674f4c453738a67d543323)
+++ 	(revision )
@@ -1,96 +1,0 @@
-
-       PRNG()   PRNG(5)    PRNG(0,5)
-     37301721         2            2
-   1681308562         1            3
-    290112364         3            2
-   1852700364         4            3
-    733221210         1            3
-   1775396023         2            3
-    123981445         2            3
-   2062557687         2            0
-    283934808         1            0
-    672325890         1            3
-   1414344101         1            3
-    873424536         3            4
-    871831898         3            4
-    866783532         0            1
-   2142057611         4            4
-     17310256         2            5
-    802117363         0            4
-    492964499         0            0
-   2346353643         1            3
-   2143013105         3            2
-seed 1009
-
-Sequential
-trials 100000000 buckets 100000 min 853 max 1141 avg 1000.0 std 31.1 rstd 3.1%
-
-Concurrent
-trials 100000000 buckets 100000 min 853 max 1141 avg 1000.0 std 31.1 rstd 3.1%
-trials 100000000 buckets 100000 min 853 max 1141 avg 1000.0 std 31.1 rstd 3.1%
-trials 100000000 buckets 100000 min 853 max 1141 avg 1000.0 std 31.1 rstd 3.1%
-trials 100000000 buckets 100000 min 853 max 1141 avg 1000.0 std 31.1 rstd 3.1%
-
-       prng()   prng(5)    prng(0,5)
-     37301721         2            2
-   1681308562         1            3
-    290112364         3            2
-   1852700364         4            3
-    733221210         1            3
-   1775396023         2            3
-    123981445         2            3
-   2062557687         2            0
-    283934808         1            0
-    672325890         1            3
-   1414344101         1            3
-    873424536         3            4
-    871831898         3            4
-    866783532         0            1
-   2142057611         4            4
-     17310256         2            5
-    802117363         0            4
-    492964499         0            0
-   2346353643         1            3
-   2143013105         3            2
-seed 1009
-
-Sequential
-trials 100000000 buckets 100000 min 853 max 1141 avg 1000.0 std 31.1 rstd 3.1%
-
-Concurrent
-trials 100000000 buckets 100000 min 853 max 1141 avg 1000.0 std 31.1 rstd 3.1%
-trials 100000000 buckets 100000 min 853 max 1141 avg 1000.0 std 31.1 rstd 3.1%
-trials 100000000 buckets 100000 min 853 max 1141 avg 1000.0 std 31.1 rstd 3.1%
-trials 100000000 buckets 100000 min 853 max 1141 avg 1000.0 std 31.1 rstd 3.1%
-
-      prng(t) prng(t,5)  prng(t,0,5)
-     37301721         2            2
-   1681308562         1            3
-    290112364         3            2
-   1852700364         4            3
-    733221210         1            3
-   1775396023         2            3
-    123981445         2            3
-   2062557687         2            0
-    283934808         1            0
-    672325890         1            3
-   1414344101         1            3
-    873424536         3            4
-    871831898         3            4
-    866783532         0            1
-   2142057611         4            4
-     17310256         2            5
-    802117363         0            4
-    492964499         0            0
-   2346353643         1            3
-   2143013105         3            2
-seed 1009
-
-Sequential
-trials 100000000 buckets 100000 min 853 max 1141 avg 1000.0 std 31.1 rstd 3.1%
-
-Concurrent
-trials 100000000 buckets 100000 min 853 max 1141 avg 1000.0 std 31.1 rstd 3.1%
-trials 100000000 buckets 100000 min 853 max 1141 avg 1000.0 std 31.1 rstd 3.1%
-trials 100000000 buckets 100000 min 853 max 1141 avg 1000.0 std 31.1 rstd 3.1%
-trials 100000000 buckets 100000 min 853 max 1141 avg 1000.0 std 31.1 rstd 3.1%
Index: tests/.expect/PRNG.x64.txt
===================================================================
--- tests/.expect/PRNG.x64.txt	(revision d2ad1518036350cdec12ea05fd951c3f04312459)
+++ tests/.expect/PRNG.x64.txt	(revision d2ad1518036350cdec12ea05fd951c3f04312459)
@@ -0,0 +1,96 @@
+
+       PRNG()   PRNG(5)    PRNG(0,5)
+          861         3            0
+10137507171299805328         1            2
+12205946788447993741         4            0
+16222929371023265189         2            5
+11921944259646500358         1            1
+9511863719043198063         2            0
+18170109536749574203         0            1
+15896208456307578543         0            3
+4171113079117645375         1            4
+5535309872453329531         1            1
+13293369315461644140         2            2
+855811942427900360         1            1
+9125507373316195824         1            5
+6942856496042419510         1            5
+16774706561877323900         2            4
+17765436951300330249         4            0
+3766082030894719812         1            2
+15818141700523398820         3            5
+1244962761353699441         0            5
+4506898200126256218         1            2
+seed 1009
+
+Sequential
+trials 100000000 buckets 100000 min 875 max 1138 avg 1000.0 std 31.8 rstd 3.2%
+
+Concurrent
+trials 100000000 buckets 100000 min 875 max 1138 avg 1000.0 std 31.8 rstd 3.2%
+trials 100000000 buckets 100000 min 875 max 1138 avg 1000.0 std 31.8 rstd 3.2%
+trials 100000000 buckets 100000 min 875 max 1138 avg 1000.0 std 31.8 rstd 3.2%
+trials 100000000 buckets 100000 min 875 max 1138 avg 1000.0 std 31.8 rstd 3.2%
+
+       prng()   prng(5)    prng(0,5)
+          861         3            0
+10137507171299805328         1            2
+12205946788447993741         4            0
+16222929371023265189         2            5
+11921944259646500358         1            1
+9511863719043198063         2            0
+18170109536749574203         0            1
+15896208456307578543         0            3
+4171113079117645375         1            4
+5535309872453329531         1            1
+13293369315461644140         2            2
+855811942427900360         1            1
+9125507373316195824         1            5
+6942856496042419510         1            5
+16774706561877323900         2            4
+17765436951300330249         4            0
+3766082030894719812         1            2
+15818141700523398820         3            5
+1244962761353699441         0            5
+4506898200126256218         1            2
+seed 1009
+
+Sequential
+trials 100000000 buckets 100000 min 875 max 1138 avg 1000.0 std 31.8 rstd 3.2%
+
+Concurrent
+trials 100000000 buckets 100000 min 875 max 1138 avg 1000.0 std 31.8 rstd 3.2%
+trials 100000000 buckets 100000 min 875 max 1138 avg 1000.0 std 31.8 rstd 3.2%
+trials 100000000 buckets 100000 min 875 max 1138 avg 1000.0 std 31.8 rstd 3.2%
+trials 100000000 buckets 100000 min 875 max 1138 avg 1000.0 std 31.8 rstd 3.2%
+
+      prng(t) prng(t,5)  prng(t,0,5)
+          861         3            0
+10137507171299805328         1            2
+12205946788447993741         4            0
+16222929371023265189         2            5
+11921944259646500358         1            1
+9511863719043198063         2            0
+18170109536749574203         0            1
+15896208456307578543         0            3
+4171113079117645375         1            4
+5535309872453329531         1            1
+13293369315461644140         2            2
+855811942427900360         1            1
+9125507373316195824         1            5
+6942856496042419510         1            5
+16774706561877323900         2            4
+17765436951300330249         4            0
+3766082030894719812         1            2
+15818141700523398820         3            5
+1244962761353699441         0            5
+4506898200126256218         1            2
+seed 1009
+
+Sequential
+trials 100000000 buckets 100000 min 875 max 1138 avg 1000.0 std 31.8 rstd 3.2%
+
+Concurrent
+trials 100000000 buckets 100000 min 875 max 1138 avg 1000.0 std 31.8 rstd 3.2%
+trials 100000000 buckets 100000 min 875 max 1138 avg 1000.0 std 31.8 rstd 3.2%
+trials 100000000 buckets 100000 min 875 max 1138 avg 1000.0 std 31.8 rstd 3.2%
+trials 100000000 buckets 100000 min 875 max 1138 avg 1000.0 std 31.8 rstd 3.2%
Index: tests/.expect/nested_function.txt
===================================================================
--- tests/.expect/nested_function.txt	(revision 25b0fde212ca4f2989674f4c453738a67d543323)
+++ tests/.expect/nested_function.txt	(revision d2ad1518036350cdec12ea05fd951c3f04312459)
@@ -1,1 +1,1 @@
-total 105
+total 80
Index: tests/PRNG.cfa
===================================================================
--- tests/PRNG.cfa	(revision 25b0fde212ca4f2989674f4c453738a67d543323)
+++ tests/PRNG.cfa	(revision d2ad1518036350cdec12ea05fd951c3f04312459)
@@ -8,6 +8,6 @@
 // Created On       : Wed Dec 29 09:38:12 2021
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Sat Apr  9 15:21:14 2022
-// Update Count     : 344
+// Last Modified On : Sun Nov 20 22:17:35 2022
+// Update Count     : 377
 // 
 
@@ -22,4 +22,10 @@
 #include <mutex_stmt.hfa>
 
+#ifdef __x86_64__										// 64-bit architecture
+#define PRNG PRNG64
+#else													// 32-bit architecture
+#define PRNG PRNG32
+#endif // __x86_64__
+
 #ifdef TIME												// use -O2 -nodebug
 #define STARTTIME start = timeHiRes()
@@ -54,5 +60,5 @@
 
 
-uint32_t seed = 1009;
+unsigned int seed = 1009;
 
 thread T1 {};
@@ -158,4 +164,5 @@
 #if 1
 	PRNG prng;
+
 	if ( seed != 0 ) set_seed( prng, seed );
 
@@ -164,6 +171,6 @@
 	for ( 20 ) {
 		sout | wd(13, prng( prng )) | nonl;				// cascading => side-effect functions called in arbitary order
-		sout | wd(10, prng( prng, 5 )) | nonl;
-		sout | wd(13, prng( prng, 0, 5 ));
+		sout | wd(10, prng( prng, 5z )) | nonl;
+		sout | wd(13, prng( prng, 0, 5z ));
 	} // for
 	sout | sepEnable;
@@ -199,6 +206,6 @@
 	for ( 20 ) {
 		sout | wd(13, prng()) | nonl;					// cascading => side-effect functions called in arbitary order
-		sout | wd(10, prng( 5 )) | nonl;
-		sout | wd(13, prng( 0, 5 ));
+		sout | wd(10, prng( 5z )) | nonl;
+		sout | wd(13, prng( 0, 5z ));
 	} // for
 	sout | sepEnable;
@@ -235,6 +242,6 @@
 	for ( 20 ) {
 		sout | wd(13, prng( th )) | nonl;				// cascading => side-effect functions called in arbitary order
-		sout | wd(10, prng( th, 5 )) | nonl;
-		sout | wd(13, prng( th, 0, 5 ));
+		sout | wd(10, prng( th, 5z )) | nonl;
+		sout | wd(13, prng( th, 0, 5z ));
 	} // for
 	sout | sepEnable;
Index: tests/concurrent/barrier/generation.cfa
===================================================================
--- tests/concurrent/barrier/generation.cfa	(revision 25b0fde212ca4f2989674f4c453738a67d543323)
+++ tests/concurrent/barrier/generation.cfa	(revision d2ad1518036350cdec12ea05fd951c3f04312459)
@@ -37,5 +37,5 @@
 		for(c; 'A' ~= 'Z') {
 			// Yield for chaos
-			yield(prng(this, 10));
+			yield( (unsigned)prng(this, 10) );
 
 			// Print the generation, no newline because
@@ -43,5 +43,5 @@
 
 			// Yield again for more chaos
-			yield(prng(this, 10));
+			yield( (unsigned)prng(this, 10) );
 
 			// Block on the barrier
Index: tests/concurrent/barrier/order.cfa
===================================================================
--- tests/concurrent/barrier/order.cfa	(revision 25b0fde212ca4f2989674f4c453738a67d543323)
+++ tests/concurrent/barrier/order.cfa	(revision d2ad1518036350cdec12ea05fd951c3f04312459)
@@ -37,5 +37,5 @@
 	for(l; NUM_LAPS) {
 		// Yield for chaos
-		yield(prng(this, 10));
+		yield( (unsigned)prng(this, 10) );
 
 		// Block and what order we arrived
Index: tests/concurrent/once.cfa
===================================================================
--- tests/concurrent/once.cfa	(revision 25b0fde212ca4f2989674f4c453738a67d543323)
+++ tests/concurrent/once.cfa	(revision d2ad1518036350cdec12ea05fd951c3f04312459)
@@ -30,5 +30,5 @@
 
 		// sometime yields
-		yield(prng(this, 3));
+		yield( (unsigned)prng(this, 3) );
 	}
 }
Index: tests/concurrent/readyQ/leader_spin.cfa
===================================================================
--- tests/concurrent/readyQ/leader_spin.cfa	(revision 25b0fde212ca4f2989674f4c453738a67d543323)
+++ tests/concurrent/readyQ/leader_spin.cfa	(revision d2ad1518036350cdec12ea05fd951c3f04312459)
@@ -26,10 +26,10 @@
 }
 
-PRNG lead_rng;
+PRNG64 lead_rng;
 volatile unsigned leader;
 volatile size_t lead_idx;
 
-const unsigned nthreads = 17;
-const unsigned stop_count = 327;
+const uint64_t nthreads = 17;
+const uint64_t stop_count = 327;
 
 thread$ * the_main;
Index: tests/io/away_fair.cfa
===================================================================
--- tests/io/away_fair.cfa	(revision 25b0fde212ca4f2989674f4c453738a67d543323)
+++ tests/io/away_fair.cfa	(revision d2ad1518036350cdec12ea05fd951c3f04312459)
@@ -67,5 +67,5 @@
 		#endif
 
-		yield( prng( this, 15 ) );
+		yield( (unsigned)prng( this, 15 ) );
 
 		#if CFA_HAVE_LINUX_IO_URING_H
Index: tests/io/comp_basic.cfa
===================================================================
--- tests/io/comp_basic.cfa	(revision 25b0fde212ca4f2989674f4c453738a67d543323)
+++ tests/io/comp_basic.cfa	(revision d2ad1518036350cdec12ea05fd951c3f04312459)
@@ -58,5 +58,5 @@
 		block( globals.bar );
 
-		yield( prng( this, 15 ) );
+		yield( (unsigned)prng( this, 15 ) );
 
 		unsigned i = __atomic_add_fetch( &counter, 1, __ATOMIC_SEQ_CST );
Index: tests/io/comp_fair.cfa
===================================================================
--- tests/io/comp_fair.cfa	(revision 25b0fde212ca4f2989674f4c453738a67d543323)
+++ tests/io/comp_fair.cfa	(revision d2ad1518036350cdec12ea05fd951c3f04312459)
@@ -78,5 +78,5 @@
 		block( globals.bar );
 
-		yield( prng( this, 15 ) );
+		yield( (unsigned)prng( this, 15 ) );
 
 		unsigned i = __atomic_add_fetch( &counter, 1, __ATOMIC_SEQ_CST );
