Index: libcfa/src/iostream.cfa
===================================================================
--- libcfa/src/iostream.cfa	(revision 7fca83260189dfdbcdd6158e13e93402ac8fe85f)
+++ libcfa/src/iostream.cfa	(revision b1e614f4e7eae09eff92b444964388046997d713)
@@ -10,6 +10,6 @@
 // Created On       : Wed May 27 17:56:53 2015
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Tue Apr 27 18:01:03 2021
-// Update Count     : 1330
+// Last Modified On : Sat May 15 09:39:21 2021
+// Update Count     : 1342
 //
 
@@ -659,7 +659,8 @@
 			int exp10, len2; \
 			eng( f.val, f.pc, exp10 );					/* changes arguments */ \
+			/* printf( "%g %d %d %d %s\n", f.val, f.wd, f.pc, exp10, format ); */ \
 			if ( ! f.flags.left && f.wd > 1 ) { \
-				/* Exponent size (number of digits, 'e', optional minus sign) */ \
-				f.wd -= lrint( floor( log10( abs( exp10 ) ) ) ) + 1 + 1 + (exp10 < 0 ? 1 : 0); \
+				/* Exponent size: 'e', optional minus sign, number of digits: log10(0) => undefined */ \
+				f.wd -= 1 + (exp10 < 0 ? 1 : 0) + lrint( floor( exp10 == 0 ? 0 : log10( abs( exp10 ) ) ) ) + 1; \
 				if ( f.wd < 1 ) f.wd = 1; \
 			} /* if */ \
@@ -708,5 +709,5 @@
 		if ( ! f.flags.pc ) {							/* no precision */ \
 			fmtstr[sizeof(DFMTNP)-2] = f.base;			/* sizeof includes '\0' */ \
-			/* printf( "%g %d %s\n", f.val, f.wd, &fmtstr[star]); */ \
+			/* printf( "%g %d %s\n", f.val, f.wd, &fmtstr[star] ); */ \
 			PrintWithDP2( os, &fmtstr[star], f.wd, f.val ) \
 		} else {										/* precision */ \
