Léa Saviot
924e235ba8
[apps/calculation] Factorize some code
2020-07-06 17:16:22 +02:00
Léa Saviot
cf4eaa3d1f
[apps/poincare] Use symbolicComputation in recursivelyMatches
...
This fixes a failed assertion for the scenario:
[3]->x then, in the Equation app, solve x+1->0
2020-06-15 16:20:09 +02:00
Émilie Feral
7b150deaeb
[apps/calculation] Hide additional outputs for Dutch exam mode
2020-06-04 14:50:10 +02:00
Émilie Feral
05a42cd2eb
[apps/shared] PoincareHelpers: implement Reduce static inline function
2020-06-04 14:50:07 +02:00
Émilie Feral
1f9cdc5648
[apps] Calculation: do not offer additional results on units if there
...
will be only one identical to the output
2020-06-04 14:50:07 +02:00
Émilie Feral
b6ee72bc21
[poincare] Clean tests on Unit
2020-06-04 14:50:07 +02:00
Émilie Feral
785d7a0a62
[apps] additional_outputs: misc. clean-up on unit additional results
2020-06-04 14:50:03 +02:00
Ruben Dashyan
266482ef99
[apps/calculation] Additional outputs for Unit
2020-06-04 14:50:01 +02:00
Léa Saviot
a56a73b0ba
[apps/calculation] Fix calculation height computation
...
It was done in two places before, which created inconsistencies
2020-05-28 04:44:27 -07:00
Léa Saviot
e2f4b30b84
[apps/calculation] Remove unused variable
2020-05-28 04:44:27 -07:00
Léa Saviot
c4908c2bd9
[apps/calculation] Fix bottom calculation margin
...
Scenario: enter a calculation that uses two lines, the margin on the
bottom is too big
2020-05-28 04:44:27 -07:00
Léa Saviot
5535145b51
[apps/calculation] Calculation on 2 lines if does not fit when expanded
...
Scenario: 1+1+1+1+1+1+1+10.5 fits on one line when not expanded, but
when the exact result is displayed not -> we thus always display it on
two lines
2020-05-28 04:44:27 -07:00
Léa Saviot
579485c8c0
[apps/calculation] CanBeSingleLine differs if args are view/layout sizes
...
If the sizes are for layouts, we need to add the margins added by the
views.
2020-05-28 04:44:27 -07:00
Léa Saviot
4f50a72abf
[apps/calculation] Clean Calculation::height
2020-05-28 04:44:27 -07:00
Léa Saviot
11c39b6206
[apps/calculation] Calculation::height has two types of margin arguments
...
One for the margin between layouts and on top / at the bottom of the
cell, the other for the margin surrounding each layout.
2020-05-28 04:44:27 -07:00
Léa Saviot
78cac6ddae
[apps/calculation] Calculation::height has CanBeSingleLine argument
2020-05-28 04:44:27 -07:00
Léa Saviot
525290427a
[apps/calculation] Calculation::height takes verticalMargin argument
2020-05-28 04:44:27 -07:00
Léa Saviot
7ccaf3fc50
[apps/calculation] Rename allExpressionsInline to forceSingleLine
2020-05-28 04:44:27 -07:00
Léa Saviot
5a68b44aa1
[apps/calc] Merge SingleLine and allExpressionsInline behaviours
2020-05-28 04:44:27 -07:00
Léa Saviot
c3d8520e73
[apps/calculation] Remove unnecessary bool
2020-05-28 04:44:27 -07:00
0b101
b48d3d6e4a
Added a new compact result display mode
2020-05-28 04:44:27 -07:00
Romain Goyet
950862f8d0
Use std::min and std::max
2020-04-14 09:31:02 -04:00
Émilie Feral
c3d8e09ceb
[apps/calculation] Calculation: invalid heights memoization when forcing the
...
display output
2020-02-20 10:56:11 +01:00
Émilie Feral
e17ae9024e
[apps] Gather all code regarding exam mode in ExamModeCOnfiguration file
2020-02-12 15:13:26 +01:00
Ruben Dashyan
81d755927c
[apps/calculation/calculation] Fix array length computation
2020-02-12 15:13:25 +01:00
Ruben Dashyan
2ae435a628
[apps/calculation/calculation] Remove redundancy
...
When each Calculation had its own text buffer, the Expression of an
overflowing output text was Undefined. Hence that Expression could have
been Undefined without the corresponding text being 'undef'. That situation
may not happen anymore since Calculation are stored in a shared buffer.
2020-02-12 15:13:24 +01:00
Ruben Dashyan
1393e5e973
[apps/calculation/calculation] Rearrange the conditions forcing DisplayOutput::ApproximateOnly
2020-02-12 15:13:24 +01:00
Ruben Dashyan
46a5a7cf5c
[apps/calculation/calculation] Force DisplayOutput::ApproximateOnly when there is Unit
...
The most common case where only the approximate output is displayed
happens when the exact and the approximate outputs are equal, more
precisely when the exact output is equal to the approximate output with
the number of significant digits taken from user settings. That
clarification matters for the Poincare::Integers which have more digits than
the number of significant digits set by the user.
Besides, an Expression containing Units is simplified as
Multiplication(Float, Unit...) recorded identically into the exact and
the approximate outputs (except perhaps the number of significant
digits). Generally, the case where the number of digits in the output is
smaller or equal to the user setting would be matched by the condition,
stated above, that exact and approximate output are equal. But that
should also be the case whatever the number of significant digits. That
is why the presence of Units is matched specifically.
2020-02-12 15:13:24 +01:00
Émilie Feral
551e4998f4
[apps/calculation][apps/solver][poincare] Simplify sign =/≈ computation
...
between outputs in Calculation/Solver
2020-02-12 15:13:23 +01:00
Émilie Feral
c2540a1d8a
[apps/calculation] Calculations now hold 4 texts: input, exact output
...
and 2 approximate outputs - one with the maximal number of significant
digits and one with the number of significant digits asked by the user.
This enables to find the approximate output without going through the
approximation routine again.
2020-02-12 15:13:23 +01:00
Ruben Dashyan
c4f112e5aa
[apps/calculation/calculation] Do not approximate approximateOutput again
2020-02-12 15:13:23 +01:00
Émilie Feral
c629cb66ba
[apps/calculation] Calculation: don't memoize the display in height
...
computation. It has to be updated everytime an exception is raised and
this was forgotten.
2020-02-12 15:13:22 +01:00
Émilie Feral
0c19b54365
[apps/calculation] Do not display additional results for Equal or Store
...
expressions
2020-02-12 15:13:22 +01:00
Émilie Feral
8d7eebbf0e
[apps/calculation] Calculation: fix variable confusion
2020-02-12 15:13:21 +01:00
Léa Saviot
756eeeb2d8
[poincare/parser] Add context
2020-02-12 15:13:21 +01:00
Émilie Feral
ba159de21d
[apps/calculation] Trigonometry additional results are displayed if the
...
input OR the output is a cosine/sine
2020-02-12 15:13:21 +01:00
Émilie Feral
398b529811
[apps/calculation][poincare] AdditionalInformationType is determined
...
from both input and output expressions of a Calculation
2020-02-12 15:13:21 +01:00
Léa Saviot
97c5ef79af
[apps/calc] Display ApproximateOnly if approximate layout cannot be created
2020-02-12 15:13:21 +01:00
Léa Saviot
1af28d4310
[apps/calc] Display ApproximateOnly if exact layout cannot be created
2020-02-12 15:13:21 +01:00
Émilie Feral
715a1a2d5e
[calculation] AdditionalInformation are base on the Calculation input
...
instead of exact output
2020-02-12 15:13:19 +01:00
Émilie Feral
157aa206c6
[calculation] Calculation: add a parameter to height to compute the
...
height of the calculation cell with all expressions inlined
2020-02-12 15:13:19 +01:00
Émilie Feral
a21689d72c
[apps/calculation][poincare] Move additionalInformationType method from
...
Calculation to Poincare module
2020-02-12 15:13:18 +01:00
Émilie Feral
66b88de4b4
[apps/calculation] WIP: Improve Calculation::additionalOuput
2020-02-12 15:13:18 +01:00
Émilie Feral
f0ec2136b7
[apps/calculation] WIP: display the complex graph when clicking on the
...
burger menu
2020-02-12 15:13:18 +01:00
Émilie Feral
fa5902dcd2
[apps/calculation] Calculation: add a methods additionalOuput
2020-02-12 15:13:18 +01:00
Émilie Feral
5491dee5ce
[calculation][solver] Do not display exact solutions in Dutch exam mode
2019-12-19 15:52:45 +01:00
Émilie Feral
221b4af631
[apps/calculation] Fix warning: taking address of a packed member is
...
unsafe
2019-09-04 15:36:37 +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