From 355c39ff43b2244cc66c41abcbe4ce8b2fc758f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89milie=20Feral?= Date: Tue, 28 Nov 2017 11:44:57 +0100 Subject: [PATCH] [poincare] In Power, change name: RationalExponentInvolvesShouldNotBeReduced -> RationalExponentShouldNotBeReduced Change-Id: I98aa93543f1dcf6a88f331c367a8dd3ca68f2d53 --- poincare/include/poincare/power.h | 2 +- poincare/src/power.cpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/poincare/include/poincare/power.h b/poincare/include/poincare/power.h index 89e66576c..6c8dcd95d 100644 --- a/poincare/include/poincare/power.h +++ b/poincare/include/poincare/power.h @@ -49,7 +49,7 @@ private: static bool TermIsARationalSquareRootOrRational(const Expression * e); static const Rational * RadicandInExpression(const Expression * e); static const Rational * RationalFactorInExpression(const Expression * e); - static bool RationalExponentInvolvesShouldNotBeReduced(const Rational * r); + static bool RationalExponentShouldNotBeReduced(const Rational * r); /* Evaluation */ constexpr static int k_maxApproximatePowerMatrix = 1000; constexpr static int k_maxExactPowerMatrix = 100; diff --git a/poincare/src/power.cpp b/poincare/src/power.cpp index 4dbb6f8fb..58e7e12f7 100644 --- a/poincare/src/power.cpp +++ b/poincare/src/power.cpp @@ -254,7 +254,7 @@ Expression * Power::shallowReduce(Context& context, AngleUnit angleUnit) { 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. */ - if (RationalExponentInvolvesShouldNotBeReduced(exp)) { + if (RationalExponentShouldNotBeReduced(exp)) { return this; } return simplifyRationalRationalPower(this, a, exp, context, angleUnit); @@ -340,7 +340,7 @@ Expression * Power::shallowReduce(Context& context, AngleUnit angleUnit) { if (a->operand(0)->type() == Type::Rational) { /* 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. */ - if (RationalExponentInvolvesShouldNotBeReduced(static_cast(a->operand(0)))) { + if (RationalExponentShouldNotBeReduced(static_cast(a->operand(0)))) { return this; } Power * p1 = static_cast(clone()); @@ -687,7 +687,7 @@ bool Power::isNthRootOfUnity() const { return false; } -bool Power::RationalExponentInvolvesShouldNotBeReduced(const Rational * r) { +bool Power::RationalExponentShouldNotBeReduced(const Rational * r) { Integer maxIntegerExponent = r->numerator(); maxIntegerExponent.setNegative(false); if (Integer::NaturalOrder(maxIntegerExponent, Integer(k_maxIntegerPower)) > 0) {