diff --git a/poincare/src/matrix_data.cpp b/poincare/src/matrix_data.cpp index 49a89c001..e5506a431 100644 --- a/poincare/src/matrix_data.cpp +++ b/poincare/src/matrix_data.cpp @@ -3,7 +3,6 @@ extern "C" { #include } #include -#include namespace Poincare { diff --git a/poincare/src/power.cpp b/poincare/src/power.cpp index 971bcef12..f94c6796d 100644 --- a/poincare/src/power.cpp +++ b/poincare/src/power.cpp @@ -52,7 +52,7 @@ Expression * Power::evaluateOnComplex(Complex * c, Complex * d, Context& context } Expression * Power::evaluateOnMatrixAndComplex(Matrix * m, Complex * c, Context& context, AngleUnit angleUnit) const { - if (m_operands[1]->type() != Expression::Type::Integer) { + if (isnan(m_operands[1]->approximate(context, angleUnit)) || m_operands[1]->approximate(context, angleUnit) != (int)m_operands[1]->approximate(context, angleUnit)) { return new Complex(Complex::Float(NAN)); } if (m->numberOfColumns() != m->numberOfRows()) {