X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?a=blobdiff_plain;f=ginac%2Fadd.cpp;h=069e3e02865dfe362d8fd05b7b491e442a372717;hb=8c7f772121440c5f2916db7bad389c3746e38bbe;hp=c75a31e793bd596967f9a296462a12cb2aa08777;hpb=2565309dd7c38635c191eacf2a4af9b23fc0d310;p=ginac.git diff --git a/ginac/add.cpp b/ginac/add.cpp index c75a31e7..069e3e02 100644 --- a/ginac/add.cpp +++ b/ginac/add.cpp @@ -185,45 +185,6 @@ basic * add::duplicate() const return new add(*this); } -/*void add::print(ostream & os, unsigned upper_precedence) const -{ - debugmsg("add print",LOGLEVEL_PRINT); - if (precedence<=upper_precedence) os << "("; - numeric coeff; - bool first=true; - for (epvector::const_iterator cit=seq.begin(); cit!=seq.end(); ++cit) { - coeff = ex_to_numeric(cit->coeff); - if (!first) { - if (coeff.csgn()==-1) os << '-'; else os << '+'; - } else { - if (coeff.csgn()==-1) os << '-'; - first=false; - } - if (!coeff.is_equal(_num1()) && - !coeff.is_equal(_num_1())) { - if (coeff.is_rational()) { - if (coeff.is_negative()) - os << -coeff; - else - os << coeff; - } else { - if (coeff.csgn()==-1) - (-coeff).print(os, precedence); - else - coeff.print(os, precedence); - } - os << '*'; - } - os << cit->rest; - } - // print the overall numeric coefficient, if present: - if (!overall_coeff.is_zero()) { - if (overall_coeff.info(info_flags::positive)) os << '+'; - os << overall_coeff; - } - if (precedence<=upper_precedence) os << ")"; -}*/ - void add::print(ostream & os, unsigned upper_precedence) const { debugmsg("add print",LOGLEVEL_PRINT);