mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-26 17:20:53 +01:00
[poincare] Fix bug in Multiplication::factorizeBase
Change-Id: If3ffc258c832e30f827eecb0a7c4e543341b5a21
This commit is contained in:
@@ -147,7 +147,7 @@ void Multiplication::factorizeBase(Expression * e1, Expression * e2) {
|
||||
const Expression * operands[2] = {e1, s};
|
||||
Power * p = new Power(operands, false);
|
||||
s->immediateSimplify();
|
||||
e1->replaceWith(p, false);
|
||||
replaceOperand(e1, p, false);
|
||||
p->immediateSimplify();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -118,6 +118,7 @@ QUIZ_CASE(poincare_simplify_easy) {
|
||||
assert_parsed_expression_simplify_to("2^P*(1/2)^P", "1");
|
||||
assert_parsed_expression_simplify_to("A^3*A^(-3)", "1");
|
||||
assert_parsed_expression_simplify_to("1+A+2+B+3", "6+A+B");
|
||||
assert_parsed_expression_simplify_to("(x+1)*(x+2)", "x^2+3x+2");
|
||||
/* This does not work but should not as it is above k_primorial32 = 1*3*5*7*11*... (product of first 32 primes. */
|
||||
//assert_parsed_expression_simplify_to("1881676377434183981909562699940347954480361860897069^(1/3)", "123456789123456789");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user