Skip to content
This repository has been archived by the owner on Jan 30, 2023. 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 7746fa2
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 80269c5 commit 4caca2e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/sage/symbolic/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 4caca2e

Please sign in to comment.