diff --git a/poincare/src/power.cpp b/poincare/src/power.cpp index b9fdaf4a7..9875a2c9a 100644 --- a/poincare/src/power.cpp +++ b/poincare/src/power.cpp @@ -240,12 +240,6 @@ Expression * Power::shallowReduce(Context& context, AngleUnit angleUnit) { } // p^q with p, q rationals if (!letPowerAtRoot && operand(1)->type() == Type::Rational) { - double p = a->approximateToScalar(context, angleUnit); - double q = operand(1)->approximateToScalar(context, angleUnit); - double approx = std::pow(std::fabs(p), std::fabs(q)); - if (std::isinf(approx) || std::isnan(approx) || std::fabs(approx)> 1E100) { - return this; - } Rational * exp = static_cast(editableOperand(1)); /* First, we check that the simplification does not involve too complex power * of integers (ie 3^999) that would take too much time to compute. */