mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-18 21:30:38 +01:00
[poincare/multiplication] Do not expand Multiplication in presence of units
This commit is contained in:
committed by
Émilie Feral
parent
bf9653d510
commit
7ef28a93bc
@@ -711,6 +711,8 @@ Expression Multiplication::privateShallowReduce(ExpressionNode::ReductionContext
|
||||
{
|
||||
const Expression c = childAtIndex(0);
|
||||
if (hasUnit()) {
|
||||
// Do not expand Multiplication in presence of units
|
||||
shouldExpand = false;
|
||||
// Make sure a Multiplication is not made of (Power of) Units only
|
||||
if (!c.isNumber()) {
|
||||
addChildAtIndexInPlace(Rational::Builder(1), 0, numberOfChildren());
|
||||
|
||||
Reference in New Issue
Block a user