From 0c718e0dda0d2de1224f39ec5e3c39720e0abfc2 Mon Sep 17 00:00:00 2001 From: Christian Bauer Date: Thu, 20 Feb 2003 22:42:31 +0000 Subject: [PATCH] synced to 1.0 --- ginac/add.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ginac/add.cpp b/ginac/add.cpp index 706013a3..9edbf139 100644 --- a/ginac/add.cpp +++ b/ginac/add.cpp @@ -144,14 +144,14 @@ void add::print(const print_context & c, unsigned level) const // Separator is "+", except if the following expression would have a leading minus sign or the sign is sitting in parenthesis (as in a ctor) ++it; if (it != itend - && (is_a(c) // sign inside ctor arguments + && (is_a(c) || !it->coeff.info(info_flags::real) // sign inside ctor arguments || !(it->coeff.info(info_flags::negative) || (it->coeff.is_equal(_num1) && is_exactly_a(it->rest) && it->rest.info(info_flags::negative))))) c.s << "+"; } if (!overall_coeff.is_zero()) { if (overall_coeff.info(info_flags::positive) - || is_a(c)) // sign inside ctor argument + || is_a(c) || !overall_coeff.info(info_flags::real)) // sign inside ctor argument c.s << '+'; overall_coeff.print(c, precedence()); } -- 2.44.0