13 if (indentationLevel>0) {
14 for (
int i=0; i<indentationLevel-1; i++) {
22 std::cout <<
"AbsoluteValue";
25 std::cout <<
"Addition";
28 std::cout <<
"ArcCosine";
31 std::cout <<
"ArcSine";
34 std::cout <<
"ArcTangent";
37 std::cout <<
"BinomialCoefficient";
40 std::cout <<
"Ceiling";
43 std::cout <<
"Complex(";
44 std::cout << static_cast<const Complex<double> *>(e)->a();
46 std::cout << static_cast<const Complex<double> *>(e)->b();
50 std::cout <<
"ComplexArgument";
53 std::cout <<
"ConfidenceInterval";
56 std::cout <<
"Conjugate";
59 std::cout <<
"Cosine";
62 std::cout <<
"Decimal(";
67 std::cout <<
"Derivative";
70 std::cout <<
"Determinant";
73 std::cout <<
"Division";
76 std::cout <<
"DivisionQuotient";
79 std::cout <<
"DivisionRemainder";
82 std::cout <<
"Factor";
85 std::cout <<
"Factorial";
91 std::cout <<
"FracPart";
94 std::cout <<
"GreatCommonDivisor";
97 std::cout <<
"HyperbolicArcCosine";
100 std::cout <<
"HyperbolicArcSine";
103 std::cout <<
"HyperbolicArcTangent";
106 std::cout <<
"HyperbolicCosine";
109 std::cout <<
"HyperbolicSine";
112 std::cout <<
"HyperbolicTangent";
115 std::cout <<
"ImaginaryPart";
118 std::cout <<
"Integral";
121 std::cout <<
"LeastCommonMultiple";
124 std::cout <<
"Logarithm";
127 std::cout <<
"Matrix(Rows: ";
128 std::cout << static_cast<const Matrix *>(e)->
numberOfRows();
129 std::cout <<
", Columns: ";
134 std::cout <<
"MatrixDimension";
137 std::cout <<
"MatrixInverse";
140 std::cout <<
"MatrixTrace";
143 std::cout <<
"MatrixTranspose";
146 std::cout <<
"Multiplication";
149 std::cout <<
"NaperianLogarithm";
152 std::cout <<
"NthRoot";
155 std::cout <<
"Opposite";
158 std::cout <<
"Parenthesis";
161 std::cout <<
"PermuteCoefficient";
164 std::cout <<
"PredictionInterval";
167 std::cout <<
"Power";
170 std::cout <<
"Product";
173 std::cout <<
"Random";
176 std::cout <<
"Randint";
179 std::cout <<
"Rational(";
180 std::cout << static_cast<const Rational * >(e)->numerator().approximate<
double>();
182 std::cout << static_cast<const Rational * >(e)->denominator().approximate<
double>();
186 std::cout <<
"RealPart";
189 std::cout <<
"Round";
192 std::cout <<
"SimplificationRoot";
198 std::cout <<
"SquareRoot";
201 std::cout <<
"Store";
204 std::cout <<
"Subtraction";
210 std::cout <<
"Symbol(";
211 switch (((
Symbol*)e)->name()) {
222 std::cout << ((
Symbol*)e)->name();
227 std::cout <<
"Tangent";
230 std::cout <<
"Undefined";
233 std::cout <<
" at " << (
void *)e <<
" with parent " << (
void *)(e->
parent()) << std::endl;
240 for (
int index = 0; index < outputLength; index++) {
241 if (outputCoefficients[index].isEqualTo(
Integer(0))) {
244 std::cout << outputFactors[index].
approximate<
double>();
246 std::cout << outputCoefficients[index].
approximate<
double>();
249 std::cout <<
" "<< std::endl;
Expression * parent() const
void print_prime_factorization(Integer *outputFactors, Integer *outputCoefficients, int outputLength)
virtual int numberOfOperands() const =0
void print_expression(const Expression *e, int indentationLevel)
constexpr uint8_t numberOfColumns
constexpr uint8_t numberOfRows
T approximateToScalar(Context &context, AngleUnit angleUnit=AngleUnit::Default) const
const Expression * operand(int i) const
virtual Type type() const =0