diff src/pr-output.cc @ 3164:45490c020e47

[project @ 1998-04-14 20:56:48 by jwe]
author jwe
date Tue, 14 Apr 1998 20:56:53 +0000
parents 02766207b74c
children bc3fdfe311a3
line wrap: on
line diff
--- a/src/pr-output.cc
+++ b/src/pr-output.cc
@@ -400,7 +400,7 @@
   int x_min = min_abs == 0.0
     ? 0 : static_cast<int> (floor (log10 (min_abs) + 1.0));
 
-  scale = x_max == 0 ? 1.0 : pow (10.0, x_max - 1);
+  scale = (x_max == 0 || int_or_inf_or_nan) ? 1.0 : pow (10.0, x_max - 1);
 
   set_real_matrix_format (sign, x_max, x_min, inf_or_nan,
 			  int_or_inf_or_nan, fw);
@@ -745,7 +745,7 @@
   int x_max = r_x_max > i_x_max ? r_x_max : i_x_max;
   int x_min = r_x_min > i_x_min ? r_x_min : i_x_min;
 
-  scale = x_max == 0 ? 1.0 : pow (10.0, x_max - 1);
+  scale = (x_max == 0 || int_or_inf_or_nan) ? 1.0 : pow (10.0, x_max - 1);
 
   set_complex_matrix_format (sign, x_max, x_min, r_x_max, r_x_min,
 			     inf_or_nan, int_or_inf_or_nan, r_fw, i_fw);
@@ -887,7 +887,7 @@
   int x_min = min_abs == 0.0
     ? 0 : static_cast<int> (floor (log10 (min_abs) + 1.0));
 
-  scale = x_max == 0 ? 1.0 : pow (10.0, x_max - 1);
+  scale = (x_max == 0 || all_ints) ? 1.0 : pow (10.0, x_max - 1);
 
   set_range_format (sign, x_max, x_min, all_ints, fw);
 }