mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[Fix] Click on symbolic expression caused undef
This commit is contained in:
@@ -186,9 +186,6 @@ Calculation::DisplayOutput Calculation::displayOutput(Context * context) {
|
||||
} else {
|
||||
m_displayOutput = DisplayOutput::ExactAndApproximate;
|
||||
}
|
||||
if (strcmp(approximateOutputText(NumberOfSignificantDigits::Maximal), Undefined::Name()) == 0) {
|
||||
m_displayOutput = DisplayOutput::ExactOnly;
|
||||
}
|
||||
return m_displayOutput;
|
||||
}
|
||||
|
||||
@@ -202,8 +199,8 @@ bool Calculation::shouldOnlyDisplayExactOutput() {
|
||||
/* If the input is a "store in a function", do not display the approximate
|
||||
* result. This prevents x->f(x) from displaying x = undef. */
|
||||
Expression i = input();
|
||||
return i.type() == ExpressionNode::Type::Store
|
||||
&& i.childAtIndex(1).type() == ExpressionNode::Type::Function;
|
||||
return (i.type() == ExpressionNode::Type::Store && i.childAtIndex(1).type() == ExpressionNode::Type::Function)
|
||||
|| strcmp(approximateOutputText(NumberOfSignificantDigits::Maximal), Undefined::Name()) == 0;
|
||||
}
|
||||
|
||||
Calculation::EqualSign Calculation::exactAndApproximateDisplayedOutputsAreEqual(Poincare::Context * context) {
|
||||
|
||||
Reference in New Issue
Block a user