Fix series of positive powers of polynomials. Before calling pseries::power_const(), make sure the basis series has sufficient terms. In particular, do not shrink the order of expansion - only grow it. Fix various hairy problems in pseries::power_const() when a polynomial is raised to a positive integer power. (The special cases here can actually also be computed by Taylor expansion but the fixes should be more general.) Also add test cases. Thanks to Vitaly Magerya <vmagerya@gmail.com> for reporting this.
Happy New Year!
[BUGFIX] Fix corner cases of factor_multivariate(). In some rare cases, factor() failed with what looks like an endless loop trying evaluation homomorphisms with ever increasing moduli (or maybe it just took eons to complete). Whether this happened depended on which symbol was left unevaluated for univariate factorization. As a workaround for this problem, we now apply the evaluation homomorphism for each symbol in a round-robin mode until one of them succeeds. This somewhat speeds up factorization of multivariate polynomials even in those cases where the old implementation terminated in time. Thanks to Vitaly Magerya <vmagerya@gmail.com> for reporting this.
Fix power::subs() in some special cases. In some cases, after subs'ing in basis and exponent, an extra substitution was performed. This could lead to messed-up final results because, e.g. substituting x==1/x in 1/x evaluated to x, but then another substitution x==1/x was performed. Reported by Feng Feng <f.feng@outlook.com>.
Finalize 1.8.2 release. Oh, and Happy New Year!
[PATCH] Make ex::operator[] const dispatch to basic::operator[] const. It turned out that ex::operator[] const dispatched to non-const basic::operator[] because * member variable ex::bp is non-const and * ptr<T>::operator*() returns a non-const T &. As a result, indexing failed for multiply referenced objects. Thanks to Vitaly Magerya <vmagerya@gmail.com> for reporting this.
Happy New Year!