* Implementation of GiNaC's symbolic integral. */
/*
- * GiNaC Copyright (C) 1999-2015 Johannes Gutenberg University Mainz, Germany
+ * GiNaC Copyright (C) 1999-2018 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
return this->hold();
}
-ex integral::evalf(int level) const
+ex integral::evalf() const
{
- ex ea;
- ex eb;
- ex ef;
-
- if (level==1) {
- ea = a;
- eb = b;
- ef = f;
- } else if (level == -max_recursion_level) {
- throw(runtime_error("max recursion level reached"));
- } else {
- ea = a.evalf(level-1);
- eb = b.evalf(level-1);
- ef = f.evalf(level-1);
- }
+ ex ea = a.evalf();
+ ex eb = b.evalf();
+ ex ef = f.evalf();
// 12.34 is just an arbitrary number used to check whether a number
// results after substituting a number for the integration variable.
static lookup_map lookup;
static symbol ivar("ivar");
ex lookupex = integral(ivar,a,b,f.subs(x==ivar));
- lookup_map::iterator emi = lookup.find(error_and_integral(error, lookupex));
+ auto emi = lookup.find(error_and_integral(error, lookupex));
if (emi!=lookup.end())
return emi->second;