Gabriel Ozouf
fad375c11c
[poincare] Add unitFormat to ReductionContext
...
Change-Id: I1d3fcd2f47c973c041e1be84e9a902dd58de3562
2020-11-04 15:11:44 +01:00
Hugo Saint-Vignes
f00c135b69
[apps/calculation] Add additional outputs for matrix
...
Change-Id: Ia4b285eb0f28eaed838d32a1fdfb785d13664f65
2020-11-04 15:07:20 +01:00
Léa Saviot
b885098963
[apps/calculation] Fix additionalInformationType
...
If an expression hasUnits and is then reduced, it might not have units
anymore for instance if it was replaced with undefined).
Scenario: Enter "[5000000000000000]^20 _s" in the calculation app
2020-07-29 10:13:19 +02:00
Émilie Feral
df74c2c551
[apps/calculation] The heights (common and expanded) of calculation cells are
...
computed when the calculation is added to the store and don't change afterwards.
Otherwise, if their heights change when scrolling (due to a modification of the
display output type - ExactOnly, ApproximateOnly...), it generates crashes.
2020-07-16 14:37:38 +02:00
Émilie Feral
c2db00cc88
[apps/calculation] When leaving calculation app, do not invalid
...
calculation height memoization. They're computed from the layouts which
don't depend on the complex format (or any other settings parameters
which could have changed).
2020-07-16 14:37:38 +02:00
Charlotte THOMAS
b5f9deb169
Update calculation.cpp
...
removed white
2020-07-15 10:28:15 +02:00
Charlotte THOMAS
f1dab081e1
Fix: CI test
2020-07-15 10:28:15 +02:00
Charlotte THOMAS
9d8b62894f
Fix: Changed "IS" to "SI" because even in english the short for "International System of Units" is "SI"
2020-07-15 10:28:15 +02:00
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