]> www.ginac.de Git - ginac.git/blobdiff - ginac/ex.cpp
- The status_flags::expanded is now used on some occasions.
[ginac.git] / ginac / ex.cpp
index 6c51fe6e02b596686fd01d788cf8cbe89539239a..4eb3d15d32210f2142533a6f558daa85bcadb5e4 100644 (file)
@@ -250,7 +250,10 @@ unsigned ex::nops() const
 ex ex::expand(unsigned options) const
 {
     GINAC_ASSERT(bp!=0);
-    return bp->expand(options);
+    if (bp->flags & status_flags::expanded)
+        return *bp;
+    else
+        return bp->expand(options);
 }
 
 bool ex::has(const ex & other) const