From fe0904cd8c2746ae74239bc2b2b26d5753cfd3dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9a=20Saviot?= Date: Tue, 20 Aug 2019 11:51:30 +0200 Subject: [PATCH] [poincare/matrix_id] If child not rational, return this in shallowRed Example: matrix_identity(cosh(0)) --- poincare/src/matrix_identity.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/poincare/src/matrix_identity.cpp b/poincare/src/matrix_identity.cpp index a20c64a25..56c637085 100644 --- a/poincare/src/matrix_identity.cpp +++ b/poincare/src/matrix_identity.cpp @@ -52,7 +52,7 @@ Expression MatrixIdentity::shallowReduce(ExpressionNode::ReductionContext reduct if (c.type() != ExpressionNode::Type::Rational || !static_cast(c).isInteger()) { - return replaceWithUndefinedInPlace(); // TODO: are we sure? + return *this; } Integer dimension = static_cast(c).signedIntegerNumerator(); if (dimension.isNegative()) {