Commit Graph

448 Commits

Author SHA1 Message Date
Ruben Dashyan
381a92f991 [apps] Remove unnecessary overriding 2019-08-29 11:07:22 +02:00
Léa Saviot
6a45073e09 [apps/calc] Fix tests 2019-08-27 17:24:57 +02:00
Léa Saviot
3849aba0c2 [apps/calculation] Don't display exact result for parametered expr
Otherwise symbolic computation is possible with, for instance :
diff(x+x,x,2)
    diff(2x,x,2) = 2
2019-08-27 17:21:48 +02:00
Léa Saviot
7e397ac92b [apps/calculation] Clean code 2019-08-27 17:21:01 +02:00
Léa Saviot
48971b6eb3 [apps/calculation] Display approx only if input = exactOutput 2019-08-27 11:09:16 +02:00
Léa Saviot
c980f8bf7c [apps/calc] Bigger serialization buffer to fix glitch
Otherwise, identity(15) displays both exact and approximate outputs,
because the approximation serialization does not fit in the buffer.
2019-08-22 10:33:40 +02:00
Léa Saviot
a3f2ab30dc [apps/calculation] Handle pool failure while calculations are slided
Exmaple :
1+1
identity(30) -> Failure while 1+1 is slided on the right
2019-08-22 10:10:27 +02:00
Léa Saviot
0556d10e7b [apps/calculation] Test about integral with symbols 2019-08-20 16:14:27 +02:00
Émilie Feral
42bb1440e3 [apps/calculation] Inputs involving 'frac' display only the approximate
output
2019-08-20 11:51:37 +02:00
Émilie Feral
1cc09de9ae [apps/calculation] Invalid calculation height memoization when leaving
the app.

Fix wrong memoization: in calculation app input '[[1+i, 2][3,4]]', change
the complex format to Polar, go back to the calculation app --> the
calculation height was no recomputed despite the fact that the approximation
output changed.
2019-08-19 09:59:01 +02:00
Émilie Feral
12060e2ae7 [escher] TextField: all text fields use the same draft text buffer 2019-08-13 09:44:00 +02:00
Émilie Feral
081462ab5e [poincare] Fix tests with Multiplication serialization (it always add
the × operator
2019-08-08 17:22:06 +02:00
Émilie Feral
0de1b575d5 Clean warnings 2019-08-08 17:22:04 +02:00
Émilie Feral
cedcab21ec [poincare] Tidy tests and add TODO for tests that need to be completed 2019-08-08 17:22:04 +02:00
Léa Saviot
4bbb8167f1 [poincare/matrix_inverse] Handle memory error in MatrixInverse 2019-08-08 17:22:04 +02:00
Émilie Feral
f546845279 [apps] Test: fix calculation and equation test with layout and
expression seriazlization
2019-08-08 17:22:03 +02:00
Léa Saviot
23acdd7f0d [apps/calc] Simplify the HistoryViewCell::m_calculationCRC32 initialization
It is not very probable that a new CRC32 should be computed to 0, and
maybe not less probable than being computed to the CRC32 of an empty
computation. However this was not mathematially verified.
2019-08-08 17:22:03 +02:00
Léa Saviot
9c95018034 [apps/calc] Init HistoryViewCell::m_calculationCRC32 to better value 2019-08-08 17:22:03 +02:00
Léa Saviot
dfe74dc1cb [apps/calculationStore] Remove falty assertion 2019-08-08 17:22:03 +02:00
Léa Saviot
2c783fe630 [apps/calcualtion] Remove TODOs 2019-08-08 17:22:03 +02:00
Léa Saviot
76a950d572 [apps/calculation] Add assertions instead of escape cases 2019-08-08 17:22:03 +02:00
Léa Saviot
d027a01851 [apps/calculation] Fix calculation memoization 2019-08-08 17:22:03 +02:00
Léa Saviot
849f9237dd [apps/calculation] Handle calculations too big for buffer 2019-08-08 17:22:03 +02:00
Léa Saviot
a7d3df39c3 Typo 2019-08-08 17:22:03 +02:00
Léa Saviot
f5e11b7d74 [apps/calculation] Exception checkpoint around secondary method
When computing [[2,3,2][ln(2),1,5][1,8,9]] there was a memory pool
failure because of the computation of
exactAndApproximateDisplayedOutputsAreEqual. Because displaying the
right equal symbol is less important than displaying a result, we
encapsulate the method in an exception checkpoint: if there was not
enough memory on the pool to compute the equal sign, just return
EqualSign::Approximation.
2019-08-08 17:22:03 +02:00
Léa Saviot
b4f6e37399 [apps/calcualtion] Optimize pool use 2019-08-08 17:22:03 +02:00
Léa Saviot
9380fafe9d [apps/calculation] Fix coding typo 2019-08-08 17:22:03 +02:00
Léa Saviot
3f6d08dd35 [apps/calc] Use memmove that is safer than memcpy
There was a wrong memcpy used in the memoization buffer sliding
2019-08-08 17:22:03 +02:00
Léa Saviot
05678b48f6 [apps/calc] Remove whole calculation memoization in HistoryViewCell
It is no longer compatible with the new calculations as they no longer
have a constant size.
2019-08-08 17:22:03 +02:00
Léa Saviot
f43e73333a [apps/calculation] Put back memoization 2019-08-08 17:22:02 +02:00
Léa Saviot
c3ee31f80e [apps/calculation] Fix HistoryController/Store index 2019-08-08 17:22:02 +02:00
Léa Saviot
1af882ddae [apps/calculation] Fix calculation history index 2019-08-08 17:22:02 +02:00
Léa Saviot
0f12d226ae [apps/calculation] Put expression in scope
To reduce the number of expressions at a givent time on the pool
2019-08-08 17:22:02 +02:00
Léa Saviot
c7fd11e4b0 [apps/calculation] Calculation store has one big buffer for calculations 2019-08-08 17:22:02 +02:00
Émilie Feral
869ab35c54 Makefile: build only necessary files for test target 2019-08-08 17:22:01 +02:00
Émilie Feral
059c596a80 Makefiles: avoid building all sources for each target; introduce more
modularity
2019-08-08 17:22:01 +02:00
Émilie Feral
518903c390 Clean warnings 2019-08-08 17:22:01 +02:00
Léa Saviot
1642df476a [apps/calculation] Don't display exact result for condifence/prediction 2019-08-08 16:29:38 +02:00
Léa Saviot
e5e9f0bf78 [apps/calculation] Fix Calculation::displayOutput
Should return ApproximateOnly if the exactOutput expression is Undefined
2019-08-08 16:29:38 +02:00
Léa Saviot
168e0b492f [apps/calculation] Don't display approximate matrices results only 2019-08-08 16:29:38 +02:00
Léa Saviot
1b42efb2cd [poincare] Tests about basic matrix simplifications + fix tests 2019-08-08 16:29:37 +02:00
Léa Saviot
61cf762eef [poincare] Expression::ReductionContext 2019-08-08 16:29:37 +02:00
Ruben Dashyan
eb6d697927 [apps] Make app accessors static members of App classes 2019-07-19 15:06:25 +02:00
Ruben Dashyan
44809f4b3f Substitute Escher app() by Container::activeApp() 2019-07-19 15:06:25 +02:00
Ruben Dashyan
1a2a651f36 [apps] Replace app() by expressionFieldDelegateApp() in Calculation::EditExpressionController 2019-07-19 15:06:25 +02:00
Ruben Dashyan
3e992a3560 [apps] Replace app() by textFieldDelegateApp() in TextFieldDelegates 2019-07-19 15:06:25 +02:00
Ruben Dashyan
9611133276 [apps] Factor Shared::TextFieldDelegateApp::isAcceptableText 2019-07-19 15:06:25 +02:00
Ruben Dashyan
055d601854 [apps] Define TextFieldDelegate::textFieldDelegateApp() directly from ::app() 2019-07-19 15:06:25 +02:00
Ruben Dashyan
5058f64163 [apps] Define LayoutFieldDelegate::expressionFieldDelegateApp() directly from ::app() 2019-07-19 15:06:25 +02:00
Ruben Dashyan
4111927bae [apps] Access *DelegateApp() through app() 2019-07-19 15:06:25 +02:00