Index: libcfa/src/bits/random.hfa
===================================================================
--- libcfa/src/bits/random.hfa	(revision 46bbcaf5b02a41281420f4eb06a9c8a6f6ff759f)
+++ libcfa/src/bits/random.hfa	(revision d3261710b857b8b3330e422f717eda5f7af70d4e)
@@ -1,11 +1,26 @@
+// 
+// Cforall Version 1.0.0 Copyright (C) 2022 University of Waterloo
+// 
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// random.hfa -- 
+// 
+// Author           : Peter A. Buhr
+// 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
+// 
+
 #pragma once
 
 #include <stdint.h>
 
-// Pipelined to allow out-of-order overlap with reduced dependencies. Critically, return the current value, and compute
-// and store the next value.
+// 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.
 
+#if defined(__SIZEOF_INT128__)
 //--------------------------------------------------
-#if defined(__SIZEOF_INT128__)
 	static inline uint64_t lehmer64( __uint128_t & state ) {
 		__uint128_t ret = state;
@@ -50,7 +65,7 @@
 } xorwow__state_t;
 
-/* The state array must be initialized to not be all zero in the first four words */
+// The state array must be initialized to not be all zero in the first four words.
 static inline uint32_t xorwow( xorwow__state_t & state ) {
-	/* Algorithm "xorwow" from p. 5 of Marsaglia, "Xorshift RNGs" */
+	// Algorithm "xorwow" from p. 5 of Marsaglia, "Xorshift RNGs".
 	uint32_t ret = state.a + state.counter;
 	uint32_t t = state.d;
@@ -84,4 +99,5 @@
 #define D  (16_l64u)
 
+// Bi-directional LCG random-number generator
 static inline uint32_t LCGBI_fwd( uint64_t & state ) {
 	state = (A * state + C) & (M - 1);
Index: libcfa/src/iostream.cfa
===================================================================
--- libcfa/src/iostream.cfa	(revision 46bbcaf5b02a41281420f4eb06a9c8a6f6ff759f)
+++ libcfa/src/iostream.cfa	(revision d3261710b857b8b3330e422f717eda5f7af70d4e)
@@ -10,6 +10,6 @@
 // Created On       : Wed May 27 17:56:53 2015
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Mon Jan 17 16:38:32 2022
-// Update Count     : 1349
+// Last Modified On : Wed Jan 19 08:15:53 2022
+// Update Count     : 1352
 //
 
@@ -205,5 +205,5 @@
 	ostype & ?|?( ostype & os, float f ) {
 		if ( sepPrt$( os ) ) fmt( os, "%s", sepGetCur$( os ) );
-		PrintWithDP( os, "%g", f );
+		PrintWithDP( os, "%'g", f );
 		return os;
 	} // ?|?
@@ -214,5 +214,5 @@
 	ostype & ?|?( ostype & os, double d ) {
 		if ( sepPrt$( os ) ) fmt( os, "%s", sepGetCur$( os ) );
-		PrintWithDP( os, "%.*lg", d, DBL_DIG );
+		PrintWithDP( os, "%'.*lg", d, DBL_DIG );
 		return os;
 	} // ?|?
@@ -223,5 +223,5 @@
 	ostype & ?|?( ostype & os, long double ld ) {
 		if ( sepPrt$( os ) ) fmt( os, "%s", sepGetCur$( os ) );
-		PrintWithDP( os, "%.*Lg", ld, LDBL_DIG );
+		PrintWithDP( os, "%'.*Lg", ld, LDBL_DIG );
 		return os;
 	} // ?|?
@@ -233,6 +233,6 @@
 		if ( sepPrt$( os ) ) fmt( os, "%s", sepGetCur$( os ) );
 //		os | crealf( fc ) | nonl;
-		PrintWithDP( os, "%g", crealf( fc ) );
-		PrintWithDP( os, "%+g", cimagf( fc ) );
+		PrintWithDP( os, "%'g", crealf( fc ) );
+		PrintWithDP( os, "%'+g", cimagf( fc ) );
 		fmt( os, "i" );
 		return os;
@@ -245,6 +245,6 @@
 		if ( sepPrt$( os ) ) fmt( os, "%s", sepGetCur$( os ) );
 //		os | creal( dc ) | nonl;
-		PrintWithDP( os, "%.*lg", creal( dc ), DBL_DIG );
-		PrintWithDP( os, "%+.*lg", cimag( dc ), DBL_DIG );
+		PrintWithDP( os, "%'.*lg", creal( dc ), DBL_DIG );
+		PrintWithDP( os, "%'+.*lg", cimag( dc ), DBL_DIG );
 		fmt( os, "i" );
 		return os;
@@ -257,6 +257,6 @@
 		if ( sepPrt$( os ) ) fmt( os, "%s", sepGetCur$( os ) );
 //		os | creall( ldc ) || nonl;
-		PrintWithDP( os, "%.*Lg", creall( ldc ), LDBL_DIG );
-		PrintWithDP( os, "%+.*Lg", cimagl( ldc ), LDBL_DIG );
+		PrintWithDP( os, "%'.*Lg", creall( ldc ), LDBL_DIG );
+		PrintWithDP( os, "%'+.*Lg", cimagl( ldc ), LDBL_DIG );
 		fmt( os, "i" );
 		return os;
@@ -282,4 +282,5 @@
 		}; // mask
 
+	  if ( s == 0p ) { fmt( os, "%s", "0p" ); return os; } // null pointer
 	  if ( s[0] == '\0' ) { sepOff( os ); return os; } // null string => no separator
 
@@ -693,5 +694,5 @@
 		if ( ! f.flags.pc ) memcpy( &fmtstr, DFMTNP, sizeof(DFMTNP) ); \
 		else memcpy( &fmtstr, DFMTP, sizeof(DFMTP) ); \
-		int star = 4;									/* position before first '*' */ \
+		int star = 5;									/* position before first '*' */ \
 \
 		/* Insert flags into spaces before '*', from right to left. */ \
@@ -699,4 +700,5 @@
 		if ( f.flags.sign ) { fmtstr[star] = '+'; star -= 1; } \
 		if ( f.flags.pad0 ) { fmtstr[star] = '0'; star -= 1; } \
+		fmtstr[star] = '\''; star -= 1;					/* locale */ \
 		fmtstr[star] = '%'; \
 \
@@ -716,6 +718,6 @@
 } // distribution
 
-FloatingPointFMTImpl( double, "     * ", "     *.* " )
-FloatingPointFMTImpl( long double, "     *L ", "     *.*L " )
+FloatingPointFMTImpl( double,      "      * ",  "      *.* " )
+FloatingPointFMTImpl( long double, "      *L ", "      *.*L " )
 
 // *********************************** character ***********************************
