mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-18 16:27:34 +01:00
[poincare/multiplication] Return Undef early
Multiplication::privateShallowReduce can create an Undef node by
multiplying 0 and inf. In this case, we set the whole multiplication to
undef, to avoid things such as undef*π.
This fixes the following bug :
- In Graph, enter i*inf*π as one of the bounds. An assertion fails in
Multiplication::removeUnit.
Change-Id: Ie9d0d561d6e310f52220b98541f22a4b5e56762c
This commit is contained in:
committed by
Émilie Feral
parent
aa14a6a82e
commit
206013f2db
@@ -778,6 +778,9 @@ Expression Multiplication::privateShallowReduce(ExpressionNode::ReductionContext
|
||||
SetInterruption(true);
|
||||
return *this;
|
||||
}
|
||||
if (m.isUndefined()) {
|
||||
return replaceWithUndefinedInPlace();
|
||||
}
|
||||
replaceChildAtIndexInPlace(0, m);
|
||||
removeChildAtIndexInPlace(i);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user