Make add::eval(), mul::eval() work without compromise.
[ginac.git] / ginac / function.cppy
index 00e4b2a677333bc7ad5481f1e44c8a3373fe7682..789ca056c2dfa9dcebd7e0d86801b7a59e518ee9 100644 (file)
@@ -364,6 +364,10 @@ next_context:
 
 ex function::eval(int level) const
 {
+       if ((level == 1) && (flags & status_flags::evaluated)) {
+               return *this;
+       }
+
        if (level>1) {
                // first evaluate children, then we will end up here again
                return function(serial,evalchildren(level));