mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-26 09:10:48 +01:00
[poincare] Clean
Change-Id: I132f49f26ccd1391051ac56acfebf4460e2bffb3
This commit is contained in:
@@ -98,7 +98,7 @@ void Addition::immediateBeautify() {
|
||||
int index = 0;
|
||||
while (index < numberOfOperands()) {
|
||||
// a+(-1)*b+... -> a-b+...
|
||||
if (operand(index)->type() == Type::Multiplication && static_cast<const Multiplication *>(operand(index))->operand(0)->type() == Type::Rational && static_cast<const Rational *>(operand(index)->operand(0))->isMinusOne()) {
|
||||
if (operand(index)->type() == Type::Multiplication && operand(index)->operand(0)->type() == Type::Rational && static_cast<const Rational *>(operand(index)->operand(0))->isMinusOne()) {
|
||||
Multiplication * m = static_cast<Multiplication *>((Expression *)operand(index));
|
||||
m->removeOperand(m->operand(0), true);
|
||||
m->squashUnaryHierarchy();
|
||||
|
||||
Reference in New Issue
Block a user