]> www.ginac.de Git - ginac.git/blobdiff - ginac/mul.cpp
Remove 'level' argument of evalf().
[ginac.git] / ginac / mul.cpp
index eef287cac8d3f090f13d7c82f8d830aa4b6a07b7..15dee661c735f831789bb5e1df634621634f009c 100644 (file)
@@ -3,7 +3,7 @@
  *  Implementation of GiNaC's products of expressions. */
 
 /*
- *  GiNaC Copyright (C) 1999-2015 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2016 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
@@ -574,22 +574,14 @@ ex mul::eval() const
        return this->hold();
 }
 
-ex mul::evalf(int level) const
+ex mul::evalf() const
 {
-       if (level==1)
-               return mul(seq, overall_coeff);
-       
-       if (level==-max_recursion_level)
-               throw(std::runtime_error("max recursion level reached"));
-       
        epvector s;
        s.reserve(seq.size());
 
-       --level;
-       for (auto & it : seq) {
-               s.push_back(expair(it.rest.evalf(level), it.coeff));
-       }
-       return dynallocate<mul>(std::move(s), overall_coeff.evalf(level));
+       for (auto & it : seq)
+               s.push_back(expair(it.rest.evalf(), it.coeff));
+       return dynallocate<mul>(std::move(s), overall_coeff.evalf());
 }
 
 void mul::find_real_imag(ex & rp, ex & ip) const