Skip to content

Commit

Permalink
Merge divisors after removing factor in SymHop
Browse files Browse the repository at this point in the history
  • Loading branch information
robbr48 committed Sep 26, 2023
1 parent e93e2dc commit d28df30
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions SymHop/src/SymHop.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2521,6 +2521,16 @@ void Expression::removeFactor(const Expression var)
if(mFactors.size() == 1 && mDivisors.empty()) {
this->replaceBy(Expression(mFactors.first()));
}
for(int d=0; d<mDivisors.size(); ++d)
{
if(mDivisors[d].isMultiplyOrDivide())
{
mFactors.append(mDivisors[d].mDivisors);
mDivisors.append(mDivisors[d].mFactors);
mDivisors.removeAt(d);
--d;
}
}
return;
}

Expand Down

0 comments on commit d28df30

Please sign in to comment.