[poincare] Fix bug in power::simplify

Change-Id: I29b843a87d2fd4d6327e43c2fda06e5d47573b28
This commit is contained in:
Émilie Feral
2017-10-09 13:30:57 +02:00
parent a61470e84a
commit ea7a22aaa4

View File

@@ -151,7 +151,7 @@ void Power::immediateSimplify() {
}
// x^1
if (b->isOne()) {
replaceWith(new Rational(Integer(1), true));
replaceWith(const_cast<Expression *>(operand(0)), true);
return;
}
// p^q with p, q rationals