Mercurial > hg > octave-max
comparison src/pr-output.cc @ 4269:5b075bd78a91
[project @ 2003-01-03 18:13:14 by jwe]
author | jwe |
---|---|
date | Fri, 03 Jan 2003 18:14:53 +0000 |
parents | ccfdb55c8156 |
children | e7e10ce42860 |
comparison
equal
deleted
inserted
replaced
4268:363d406ec86c | 4269:5b075bd78a91 |
---|---|
54 #include "pr-output.h" | 54 #include "pr-output.h" |
55 #include "sysdep.h" | 55 #include "sysdep.h" |
56 #include "utils.h" | 56 #include "utils.h" |
57 #include "variables.h" | 57 #include "variables.h" |
58 | 58 |
59 #if defined (__GNUG__) | |
60 #define STD_QUAL std:: | |
61 #else | |
62 #define STD_QUAL | |
63 #endif | |
64 | |
59 // TRUE means use a scaled fixed point format for `format long' and | 65 // TRUE means use a scaled fixed point format for `format long' and |
60 // `format short'. | 66 // `format short'. |
61 static bool Vfixed_point_format; | 67 static bool Vfixed_point_format; |
62 | 68 |
63 // The maximum field width for a number printed by the default output | 69 // The maximum field width for a number printed by the default output |
497 ? 0 : static_cast<int> (floor (log10 (max_abs) + 1.0)); | 503 ? 0 : static_cast<int> (floor (log10 (max_abs) + 1.0)); |
498 | 504 |
499 int x_min = min_abs == 0.0 | 505 int x_min = min_abs == 0.0 |
500 ? 0 : static_cast<int> (floor (log10 (min_abs) + 1.0)); | 506 ? 0 : static_cast<int> (floor (log10 (min_abs) + 1.0)); |
501 | 507 |
502 scale = (x_max == 0 || int_or_inf_or_nan) ? 1.0 : std::pow (10.0, x_max - 1); | 508 scale = (x_max == 0 || int_or_inf_or_nan) ? 1.0 : STD_QUAL pow (10.0, x_max - 1); |
503 | 509 |
504 set_real_matrix_format (sign, x_max, x_min, inf_or_nan, | 510 set_real_matrix_format (sign, x_max, x_min, inf_or_nan, |
505 int_or_inf_or_nan, fw); | 511 int_or_inf_or_nan, fw); |
506 } | 512 } |
507 | 513 |
848 ? 0 : static_cast<int> (floor (log10 (i_min_abs) + 1.0)); | 854 ? 0 : static_cast<int> (floor (log10 (i_min_abs) + 1.0)); |
849 | 855 |
850 int x_max = r_x_max > i_x_max ? r_x_max : i_x_max; | 856 int x_max = r_x_max > i_x_max ? r_x_max : i_x_max; |
851 int x_min = r_x_min > i_x_min ? r_x_min : i_x_min; | 857 int x_min = r_x_min > i_x_min ? r_x_min : i_x_min; |
852 | 858 |
853 scale = (x_max == 0 || int_or_inf_or_nan) ? 1.0 : std::pow (10.0, x_max - 1); | 859 scale = (x_max == 0 || int_or_inf_or_nan) ? 1.0 : STD_QUAL pow (10.0, x_max - 1); |
854 | 860 |
855 set_complex_matrix_format (sign, x_max, x_min, r_x_max, r_x_min, | 861 set_complex_matrix_format (sign, x_max, x_min, r_x_max, r_x_min, |
856 inf_or_nan, int_or_inf_or_nan, r_fw, i_fw); | 862 inf_or_nan, int_or_inf_or_nan, r_fw, i_fw); |
857 } | 863 } |
858 | 864 |
989 ? 0 : static_cast<int> (floor (log10 (max_abs) + 1.0)); | 995 ? 0 : static_cast<int> (floor (log10 (max_abs) + 1.0)); |
990 | 996 |
991 int x_min = min_abs == 0.0 | 997 int x_min = min_abs == 0.0 |
992 ? 0 : static_cast<int> (floor (log10 (min_abs) + 1.0)); | 998 ? 0 : static_cast<int> (floor (log10 (min_abs) + 1.0)); |
993 | 999 |
994 scale = (x_max == 0 || all_ints) ? 1.0 : std::pow (10.0, x_max - 1); | 1000 scale = (x_max == 0 || all_ints) ? 1.0 : STD_QUAL pow (10.0, x_max - 1); |
995 | 1001 |
996 set_range_format (sign, x_max, x_min, all_ints, fw); | 1002 set_range_format (sign, x_max, x_min, all_ints, fw); |
997 } | 1003 } |
998 | 1004 |
999 static inline void | 1005 static inline void |