]> www.ginac.de Git - ginac.git/commitdiff
* add::print() shouldn't put parens around overall_coeff.
authorRichard Kreckel <Richard.Kreckel@uni-mainz.de>
Fri, 13 Apr 2001 18:27:34 +0000 (18:27 +0000)
committerRichard Kreckel <Richard.Kreckel@uni-mainz.de>
Fri, 13 Apr 2001 18:27:34 +0000 (18:27 +0000)
ginac/add.cpp

index cfcae9bc14640638a88531e149141a6ceec6aeb2..802c23721d0c04beda4533527d6d819615eeb6b0 100644 (file)
@@ -174,7 +174,10 @@ void add::print(const print_context & c, unsigned level) const
 
                // First print the overall numeric coefficient, if present
                if (!overall_coeff.is_zero()) {
 
                // First print the overall numeric coefficient, if present
                if (!overall_coeff.is_zero()) {
-                       overall_coeff.print(c, precedence);
+                       if (!is_of_type(c, print_tree))
+                               overall_coeff.print(c, 0);
+                       else
+                               overall_coeff.print(c, precedence);
                        first = false;
                }
 
                        first = false;
                }