Skip to content
This repository has been archived by the owner on Sep 26, 2021. It is now read-only.

Commit

Permalink
apply trac 31530 patch pynac power::subs
Browse files Browse the repository at this point in the history
commit 7746fa272893bf393ea9b7a9dfb9959db7facb7c
Author: Dave Witte Morris <Dave.Morris@uleth.ca>
Date:   Wed Mar 24 17:35:16 2021 -0600

    trac 31530 patch pynac power::subs
  • Loading branch information
dimpase committed Jun 25, 2021
1 parent a51bcec commit 9d442a8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ginac/power.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -745,6 +745,10 @@ ex power::subs(const exmap & m, unsigned options) const
if (!are_ex_trivially_equal(basis, subsed_basis)
|| !are_ex_trivially_equal(exponent, subsed_exponent)) {
ex p = power(subsed_basis, subsed_exponent);
if (!is_exactly_a<power>(p)) {
// trac 30378 and 31530: do not over-substitute
return p;
}
ex t = ex_to<power>(p).subs_one_level(m, options);
if ((t-*this).is_zero())
return p;
Expand Down

0 comments on commit 9d442a8

Please sign in to comment.