[poincare] In Power, change name:

RationalExponentInvolvesShouldNotBeReduced ->
RationalExponentShouldNotBeReduced

Change-Id: I98aa93543f1dcf6a88f331c367a8dd3ca68f2d53
This commit is contained in:
Émilie Feral
2017-11-28 11:44:57 +01:00
parent ea1af0cfda
commit 355c39ff43
2 changed files with 4 additions and 4 deletions

View File

@@ -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;

View File

@@ -254,7 +254,7 @@ Expression * Power::shallowReduce(Context& context, AngleUnit angleUnit) {
Rational * exp = static_cast<Rational *>(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<const Rational *>(a->operand(0)))) {
if (RationalExponentShouldNotBeReduced(static_cast<const Rational *>(a->operand(0)))) {
return this;
}
Power * p1 = static_cast<Power *>(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) {