[poincare] Step I: add a parameter to approximation routines to indicate

if we're within a reduction routine
This commit is contained in:
Émilie Feral
2020-11-02 17:27:46 +01:00
parent 58867b66ca
commit 75dc415e27
14 changed files with 37 additions and 35 deletions

View File

@@ -33,7 +33,7 @@ const Expression VariableContext::expressionForSymbolAbstract(const SymbolAbstra
Symbol unknownSymbol = Symbol::Builder(UCodePointUnknown);
if (m_name != nullptr && strcmp(m_name, unknownSymbol.name()) == 0) {
assert(std::isnan(unknownSymbolValue));
unknownSymbolValue = m_value.approximateToScalar<float>(this, Preferences::sharedPreferences()->complexFormat(),Preferences::sharedPreferences()->angleUnit());
unknownSymbolValue = m_value.approximateToScalar<float>(this, Preferences::sharedPreferences()->complexFormat(), Preferences::sharedPreferences()->angleUnit(), true);
}
return ContextWithParent::expressionForSymbolAbstract(symbol, clone, unknownSymbolValue);
}