mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[poincare/matrix_identity] Fix shallowReduce
This commit is contained in:
@@ -49,7 +49,9 @@ Expression MatrixIdentity::shallowReduce(ExpressionNode::ReductionContext reduct
|
||||
}
|
||||
}
|
||||
Expression c = childAtIndex(0);
|
||||
if (!c.isRationalOne()) {
|
||||
if (c.type() != ExpressionNode::Type::Rational
|
||||
|| !static_cast<Rational&>(c).isInteger())
|
||||
{
|
||||
return replaceWithUndefinedInPlace();
|
||||
}
|
||||
Integer dimension = static_cast<Rational &>(c).signedIntegerNumerator();
|
||||
|
||||
Reference in New Issue
Block a user