]> www.ginac.de Git - ginac.git/blobdiff - ginac/normal.cpp
Patches by Vladimir.
[ginac.git] / ginac / normal.cpp
index db1ca467e422f856e4687bb3b5b58f3889ada51c..7b90030de6b0fb595b781b9f3c7a532ad4e6c015 100644 (file)
@@ -2388,6 +2388,8 @@ ex power::to_polynomial(exmap & repl) const
 {
        if (exponent.info(info_flags::posint))
                return power(basis.to_rational(repl), exponent);
+       else if (exponent.info(info_flags::negint))
+               return power(replace_with_symbol(power(basis, _ex_1), repl), -exponent);
        else
                return replace_with_symbol(*this, repl);
 }