mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-23 15:50:49 +01:00
[poincare] Improve implementation of Division::shallowReduce
Change-Id: Id6b1f6606e5d4aa11b2543151fbba3c7be54551c
This commit is contained in:
@@ -14,6 +14,7 @@ class Power : public StaticHierarchy<2> {
|
||||
friend class NthRoot;
|
||||
friend class SquareRoot;
|
||||
friend class Addition;
|
||||
friend class Division;
|
||||
public:
|
||||
Type type() const override;
|
||||
Expression * clone() const override;
|
||||
|
||||
@@ -31,7 +31,7 @@ Expression * Division::shallowReduce(Context& context, AngleUnit angleUnit) {
|
||||
Power * p = new Power(operand(1), new Rational(-1), false);
|
||||
Multiplication * m = new Multiplication(operand(0), p, false);
|
||||
detachOperands();
|
||||
p->deepReduce(context, angleUnit);
|
||||
p->shallowReduce(context, angleUnit);
|
||||
replaceWith(m, true);
|
||||
return m->shallowReduce(context, angleUnit);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user