mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[poincare/multiplication] Factoring undef power
When factoring 1^inf * 1^-inf with Multiplication::factorizeBase, an Undef factor would appear an be carried into the reduced multiplication. We escape early in this situation by returning Undef. Change-Id: Id826ad3cc131349e5bb460f7a8c82fe606294b97
This commit is contained in:
committed by
Émilie Feral
parent
59d5adace3
commit
d6c7b2b1ac
@@ -731,6 +731,11 @@ Expression Multiplication::privateShallowReduce(ExpressionNode::ReductionContext
|
||||
}
|
||||
if (shouldFactorizeBase) {
|
||||
factorizeBase(i, i+1, reductionContext);
|
||||
/* An undef term could have appeared when factorizing 1^inf and 1^-inf
|
||||
* for instance. In that case, we escape and return undef. */
|
||||
if (childAtIndex(i).isUndefined()) {
|
||||
return replaceWithUndefinedInPlace();
|
||||
}
|
||||
continue;
|
||||
}
|
||||
} else if (TermHasNumeralBase(oi) && TermHasNumeralBase(oi1) && TermsHaveIdenticalExponent(oi, oi1)) {
|
||||
|
||||
Reference in New Issue
Block a user