From 0443769c1345121d4aa4828a327af6bcfdb7d2e9 Mon Sep 17 00:00:00 2001 From: Christian Bauer Date: Thu, 20 Feb 2003 22:40:45 +0000 Subject: [PATCH] 'x+I' was missing the plus sign in the C source output --- ginac/add.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ginac/add.cpp b/ginac/add.cpp index 96469915..b409513c 100644 --- a/ginac/add.cpp +++ b/ginac/add.cpp @@ -145,14 +145,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.50.0