* Implementation of GiNaC's sums of expressions. */
/*
- * GiNaC Copyright (C) 1999-2008 Johannes Gutenberg University Mainz, Germany
+ * GiNaC Copyright (C) 1999-2009 Johannes Gutenberg University Mainz, Germany
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include <iostream>
-#include <stdexcept>
-#include <limits>
-#include <string>
-
#include "add.h"
#include "mul.h"
#include "archive.h"
#include "clifford.h"
#include "ncmul.h"
+#include <iostream>
+#include <limits>
+#include <stdexcept>
+#include <string>
+
namespace GiNaC {
GINAC_IMPLEMENT_REGISTERED_CLASS_OPT(add, expairseq,
case info_flags::integer_polynomial:
case info_flags::cinteger_polynomial:
case info_flags::rational_polynomial:
+ case info_flags::real:
+ case info_flags::rational:
+ case info_flags::integer:
+ case info_flags::crational:
+ case info_flags::cinteger:
+ case info_flags::positive:
+ case info_flags::nonnegative:
+ case info_flags::posint:
+ case info_flags::nonnegint:
+ case info_flags::even:
case info_flags::crational_polynomial:
case info_flags::rational_function: {
epvector::const_iterator i = seq.begin(), end = seq.end();
return false;
++i;
}
+ if (overall_coeff.is_zero() && (inf == info_flags::positive || inf == info_flags::posint))
+ return true;
return overall_coeff.info(inf);
}
case info_flags::algebraic: {