]> www.ginac.de Git - ginac.git/blobdiff - ginac/power.cpp
Synced to HEAD:
[ginac.git] / ginac / power.cpp
index bbcb45368bcf6465f1409cf78d0945b2606df6a1..010af6c961847f65c2417bed3355f7476a2c52d5 100644 (file)
@@ -680,6 +680,9 @@ unsigned power::return_type_tinfo() const
 
 ex power::expand(unsigned options) const
 {
+       if (is_a<symbol>(basis) && exponent.info(info_flags::integer))
+               return (new power(*this))->setflag(status_flags::dynallocated | status_flags::expanded);
+
        if (options == 0 && (flags & status_flags::expanded))
                return *this;