mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-30 04:00:02 +02:00
[poincare] Add complex format as an argument of simplification
This commit is contained in:
@@ -62,8 +62,8 @@ int FunctionNode::serialize(char * buffer, int bufferSize, Preferences::PrintFlo
|
||||
return SerializationHelper::Prefix(this, buffer, bufferSize, floatDisplayMode, numberOfSignificantDigits, name());
|
||||
}
|
||||
|
||||
Expression FunctionNode::shallowReduce(Context & context, Preferences::AngleUnit angleUnit, ReductionTarget target) {
|
||||
return Function(this).shallowReduce(context, angleUnit, target); // This uses Symbol::shallowReduce
|
||||
Expression FunctionNode::shallowReduce(Context & context, Preferences::ComplexFormat complexFormat, Preferences::AngleUnit angleUnit, ReductionTarget target) {
|
||||
return Function(this).shallowReduce(context, complexFormat, angleUnit, target); // This uses Symbol::shallowReduce
|
||||
}
|
||||
|
||||
Expression FunctionNode::shallowReplaceReplaceableSymbols(Context & context) {
|
||||
@@ -113,12 +113,12 @@ Expression Function::replaceSymbolWithExpression(const SymbolAbstract & symbol,
|
||||
return *this;
|
||||
}
|
||||
|
||||
Expression Function::shallowReduce(Context & context, Preferences::AngleUnit angleUnit, ExpressionNode::ReductionTarget target) {
|
||||
Expression Function::shallowReduce(Context & context, Preferences::ComplexFormat complexFormat, Preferences::AngleUnit angleUnit, ExpressionNode::ReductionTarget target) {
|
||||
Function f(*this);
|
||||
Expression e = SymbolAbstract::Expand(f, context, true);
|
||||
if (!e.isUninitialized()) {
|
||||
replaceWithInPlace(e);
|
||||
return e.deepReduce(context, angleUnit, target);
|
||||
return e.deepReduce(context, complexFormat, angleUnit, target);
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user