mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-21 14:50:44 +01:00
[poincare/expression] Call reduce instead of deepReduce
This commit is contained in:
committed by
Émilie Feral
parent
8e71e03b6e
commit
b8993eafa9
@@ -604,7 +604,7 @@ void Expression::ParseAndSimplifyAndApproximate(const char * text, Expression *
|
||||
|
||||
Expression Expression::simplify(ExpressionNode::ReductionContext reductionContext) {
|
||||
sSimplificationHasBeenInterrupted = false;
|
||||
Expression e = deepReduce(reductionContext);
|
||||
Expression e = reduce(reductionContext);
|
||||
if (!sSimplificationHasBeenInterrupted) {
|
||||
e = e.deepBeautify(reductionContext);
|
||||
}
|
||||
@@ -679,11 +679,11 @@ void Expression::simplifyAndApproximate(Expression * simplifiedExpression, Expre
|
||||
// Step 1: we reduce the expression
|
||||
ExpressionNode::ReductionContext userReductionContext = ExpressionNode::ReductionContext(context, complexFormat, angleUnit, ExpressionNode::ReductionTarget::User, symbolicComputation);
|
||||
const bool isUnitConvert = type() == ExpressionNode::Type::UnitConvert;
|
||||
Expression e = clone().deepReduce(userReductionContext);
|
||||
Expression e = clone().reduce(userReductionContext);
|
||||
if (sSimplificationHasBeenInterrupted) {
|
||||
sSimplificationHasBeenInterrupted = false;
|
||||
ExpressionNode::ReductionContext systemReductionContext = ExpressionNode::ReductionContext(context, complexFormat, angleUnit, ExpressionNode::ReductionTarget::SystemForApproximation, symbolicComputation);
|
||||
e = deepReduce(systemReductionContext);
|
||||
e = reduce(systemReductionContext);
|
||||
}
|
||||
*simplifiedExpression = Expression();
|
||||
if (sSimplificationHasBeenInterrupted) {
|
||||
|
||||
Reference in New Issue
Block a user