Commit Graph

334 Commits

Author SHA1 Message Date
Émilie Feral
26e2e9be0d [poincare] Add complex format as an argument of simplification 2019-01-10 11:42:04 +01:00
Émilie Feral
6fd3a155df [calculation] Take into account the complex format 'real' 2019-01-10 11:42:04 +01:00
Émilie Feral
b6ec84f6a9 [calculation] Clean and add tests on CalculationStore 2019-01-10 11:42:04 +01:00
Émilie Feral
c6039423a9 [poincare] When simplifying an expression, also compute the approximation from the reduced
expression to avoid loss of precision.

If an expression is reduced to a ComplexCartesian(a, b), we compute the
approximation from ComplexCartesian(a,b) instead of going through the
potentially complicated expression resulting from beautifying
(sqrt(a^2+b^2)*exp(i*(arctan(b/a) -Pi/2*sign(b)) for example)
2019-01-10 11:42:03 +01:00
Émilie Feral
383ac004cf [poincare] Take into account complex format in simplify 2019-01-10 11:42:03 +01:00
Émilie Feral
9efc9e02e6 [poincare] Revert simplifyForComplexFormat 2019-01-10 11:42:03 +01:00
Émilie Feral
8f63416097 [calculation] Fix Calculation operator == 2019-01-10 11:42:03 +01:00
Émilie Feral
79e7fb2183 [calculation] Use ParseAndSimplifyForComplexFormat instead of
ParseAndSimplify
2019-01-10 11:42:03 +01:00
Léa Saviot
56504525c9 [Makfile] Remove superfluous test_objs
We now build all objects even for test, so we do not need most of the
previous test_objs
2018-12-19 09:44:58 +01:00
Émilie Feral
f7193602ef [calculation] Bug in the subview selected with heigh cells
In SelectableTableView::selectCellAtLocation, we call 'tableViewDidChangeSelection'
before scrolling. Therefore, the cell with updated with the right selected subview
is not the one drawn... To solve this issue, we keep the selectedSubview ('model')
 in the HistoryController instead of in the limited-lifespan view.
2018-12-06 14:52:23 +01:00
Léa Saviot
70a4542705 [apps/calc] Add test on shouldOnlyDisplayApproximateOutput 2018-12-03 15:03:24 +00:00
Léa Saviot
fb44f8617c [apps/calculation] Fix display exact and approx results
If the results are equal but their layouts not, because of the number of
significant digits for instance, display both the equal and approximate
results.
2018-12-03 12:32:51 +00:00
Émilie Feral
cf92eb8506 [poincare] Discard useless argument 'replaceSymbols' from simplification
routine
2018-11-30 09:53:31 +01:00
Émilie Feral
55be86ef50 [escher] TableView::cellAtLocation should return nullptr if the cell is
invisible and therefore no view displays it.

Fix bug: add 4 functions, in the values table one cell is wrong as soon
as you edit an x value
2018-11-26 11:24:30 +01:00
Léa Saviot
53e4a290f7 [poincare] Rename Expression:parse in Parse 2018-11-23 12:04:09 +01:00
Léa Saviot
94603b2b7d [poincare] Layout::serialize is serializeForParsing or ParsedExpression
serializeForParsing serializes the layout once,
serializeParsedExpression serializes the layout, parses it and
serializes it again.
2018-11-23 12:04:09 +01:00
Léa Saviot
79e3842e2d [apps/calculation] Add matrix test in calculation_display_exact_approximate 2018-11-23 12:04:09 +01:00
Léa Saviot
2f8bd5a241 [apps/Calculation] Fix forgotten namespace 2018-11-23 12:04:09 +01:00
Léa Saviot
33676e915a [apps] Check that serialized expression is not too long in Graph 2018-11-23 12:04:09 +01:00
Léa Saviot
f5586b3d36 [apps] Clean the syntax error warning displaying 2018-11-23 12:04:09 +01:00
Léa Saviot
51ddba058f [apps] Add test about Calculation output: 2x-x should just display x 2018-11-23 12:04:08 +01:00
Léa Saviot
a289d77425 [apps/calculation] Fix non returning method 2018-11-23 12:04:08 +01:00
Léa Saviot
63e83c246b [poincare] Undefined::Name() gives "undef" 2018-11-23 12:04:08 +01:00
Léa Saviot
1cb9d5445c [apps/calculation] Do not display approximate output if it is undef 2018-11-23 12:04:08 +01:00
Léa Saviot
f6804c2d67 [apps] Use ExpressionFieldDelegateApp methods in Calculation::App
For methods textFieldDidReceiveEvent and layoutFieldDidReceiveEvent
2018-11-23 12:04:08 +01:00
Léa Saviot
789d17189e [apps/calculation] Comment why shouldOnlyDisplayExactOutput is needed 2018-11-23 12:04:07 +01:00
Léa Saviot
5d6db930fd [apps/calc] Fix display glitch when doing 1.2->a (cell not high enough) 2018-11-23 12:04:07 +01:00
Léa Saviot
8a272458de [poincare] recursivelyMatches takes replaceSymbols parameter
This fixes:
[7]->a
1+2->a
The second operation would get interrupted because 'a' is a matrix if
symbols are replaced
2018-11-23 12:04:07 +01:00
Léa Saviot
527c1d02ce [apps/calc] Replacing ans in the input may make the input unparsable 2018-11-23 12:04:07 +01:00
Léa Saviot
d411ff292e [poincare] Do not parse 1>ans 2018-11-23 12:04:07 +01:00
Léa Saviot
f7913fb744 [apps/calc] Fix history cell output copy 2018-11-23 12:04:06 +01:00
Léa Saviot
7c4b7495f3 [apps/poincare] Inline some methods 2018-11-23 12:04:04 +01:00
Émilie Feral
7e7c77a0e8 [escher] TextField and LayoutField handle move events while in editing
mode to avoid leaving unexpectedly edition mode
2018-11-23 12:04:03 +01:00
Émilie Feral
4f2985e6fb [calculation] Replace symbols when simplifying 2018-11-23 12:04:03 +01:00
Léa Saviot
4d71a3a4c6 [apps/poincare] Do not replace symbols in result of 3+c->f(x) 2018-11-23 12:04:03 +01:00
Léa Saviot
8e6cff9572 [apps] Remove faulty assertion 2018-11-23 12:04:03 +01:00
Léa Saviot
196e74297e [apps] Rename exact/approx as left/right in scrollable_exact_approx_exp_view 2018-11-23 12:04:03 +01:00
Léa Saviot
d083d05609 [apps/calculation] Display the exact layout only when the exp is Store 2018-11-23 12:04:03 +01:00
Émilie Feral
0a823da78c [escher] Variable box pop-up is handle as Toolbox pop-up by asking
InputEventHandlerDelegate
2018-11-23 12:04:03 +01:00
Émilie Feral
698332c355 [escher] InputTextDelegate and LayoutFieldDelegate don't inherit from
InputTextDelegate to avoid diamond inheritance
2018-11-23 12:04:03 +01:00
Léa Saviot
da226f7861 [tests] Fix GlobalContext namespace and duplicate test 2018-11-23 12:04:01 +01:00
Léa Saviot
a7a719df4a [poincare] Handle functions in replaceSymbolWithExp and similar methods 2018-11-23 12:03:59 +01:00
Émilie Feral
cf68a9ed18 [shared] Change TextFieldDelegateApp::XNT() signature 2018-11-23 12:03:59 +01:00
Émilie Feral
a93e9566ad [escher] Create a parent class Field of TextField and
LayoutField
2018-11-23 12:03:59 +01:00
Léa Saviot
2e2bf96bca [apps/poincare] use Symbol::k_ans constexpr char * 2018-11-23 12:03:58 +01:00
Émilie Feral
7f72f820a0 [poincare] Get rid of SpecialSymbols::Ans 2018-11-23 12:03:58 +01:00
Léa Saviot
f6edf05708 [calculation] Compare simplified exact and approx outputs to determine = 2018-11-19 18:02:55 +01:00
Léa Saviot
154d1e7307 [apps/calculation] Inline constructor 2018-11-19 18:02:55 +01:00
Léa Saviot
ed5a6d4a03 [apps/calculation] Remove unneeded arguments 2018-11-19 18:02:55 +01:00
Léa Saviot
6c5b0def7b [apps/calculation] Test on equal/approximate display 2018-11-19 18:02:55 +01:00