1 #ifndef POINCARE_POWER_H 2 #define POINCARE_POWER_H 27 constexpr
static int k_maxNumberOfTermsInExpandedMultinome = 25;
28 constexpr
static int k_maxIntegerPower = 100;
33 bool needParenthesisWithParent(
const Expression * e)
const override;
34 int writeTextInBuffer(
char * buffer,
int bufferSize,
int numberOfSignificantDigits = PrintFloat::k_numberOfStoredSignificantDigits)
const override {
37 static const char * name() {
return "^"; }
41 int simplificationOrderGreaterType(
const Expression * e,
bool canBeInterrupted)
const override;
42 int simplificationOrderSameType(
const Expression * e,
bool canBeInterrupted)
const override;
48 bool parentIsALogarithmOfSameBase()
const;
49 bool isNthRootOfUnity()
const;
50 static Expression * CreateSimplifiedIntegerRationalPower(Integer i,
Rational * r,
bool isDenominator, Context & context,
AngleUnit angleUnit);
52 static bool TermIsARationalSquareRootOrRational(
const Expression * e);
55 static bool RationalExponentShouldNotBeReduced(
const Rational * r);
57 constexpr
static int k_maxApproximatePowerMatrix = 1000;
58 constexpr
static int k_maxExactPowerMatrix = 100;
59 template<
typename T>
static Matrix * computeOnComplexAndMatrix(
const Complex<T> *
c,
const Matrix * n) {
return nullptr; }
60 template<
typename T>
static Matrix * computeOnMatrixAndComplex(
const Matrix * m,
const Complex<T> * d);
61 template<
typename T>
static Matrix * computeOnMatrices(
const Matrix * m,
const Matrix * n) {
return nullptr; }
63 return ApproximationEngine::mapReduce<float>(
this, context, angleUnit, compute<float>, computeOnComplexAndMatrix<float>, computeOnMatrixAndComplex<float>, computeOnMatrices<float>);
66 return ApproximationEngine::mapReduce<double>(
this, context, angleUnit, compute<double>, computeOnComplexAndMatrix<double>, computeOnMatrixAndComplex<double>, computeOnMatrices<double>);
static int writeInfixExpressionTextInBuffer(const Expression *expression, char *buffer, int bufferSize, int numberOfDigits, const char *operatorName)
Sign sign() const override
friend class Multiplication
int polynomialDegree(char symbolName) const override
Expression * clone() const override
static Complex< T > compute(const Complex< T > c, const Complex< T > d)
Type type() const override