From 11b2eaecce8a55ee3316aa71326d557cf7919051 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89milie=20Feral?= Date: Mon, 27 Nov 2017 14:44:28 +0100 Subject: [PATCH] [poincare] Clean: delete old code that was forgotten Change-Id: If3d0d0ee794f6993ea1d05aa61ce42ad12f4cb79 --- poincare/src/power.cpp | 6 ------ 1 file changed, 6 deletions(-) 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. */