GINAC_ASSERT(is_canonical());
}
+add::add(epvector && vp)
+{
+ overall_coeff = _ex0;
+ construct_from_epvector(std::move(vp));
+ GINAC_ASSERT(is_canonical());
+}
+
add::add(epvector && vp, const ex & oc)
{
overall_coeff = oc;
* an expression that contain a plain number.
* - +(;c) -> c
* - +(x;0) -> x
- *
- * @param level cut-off in recursive evaluation */
-ex add::eval(int level) const
+ */
+ex add::eval() const
{
- if ((level == 1) && (flags & status_flags::evaluated)) {
+ if (flags & status_flags::evaluated) {
GINAC_ASSERT(seq.size()>0);
GINAC_ASSERT(seq.size()>1 || !overall_coeff.is_zero());
return *this;
}
- const epvector evaled = evalchildren(level);
+ const epvector evaled = evalchildren();
if (unlikely(!evaled.empty())) {
// start over evaluating a new object
return dynallocate<add>(std::move(evaled), overall_coeff);
for (auto & it : seq)
s.push_back(expair(it.rest.diff(y), it.coeff));
- return dynallocate<add>(std::move(s), _ex0);
+ return dynallocate<add>(std::move(s));
}
int add::compare_same_type(const basic & other) const