Léa Saviot
c4b5d4cf40
Merge branch 'SaisieJolieRebase1201' into SaisieJolieMerge10Apr
...
Change-Id: I802dbb9f7c0eebf75a1b6cd21ddd194e89b53752
2018-04-10 17:21:54 +02:00
Romain Goyet
7de609028c
[poincare] Don't make Integer::k_primorial32 a global variable
2018-04-10 15:09:30 +02:00
Émilie Feral
a9e8cc3f35
[poincare] fix characteristicXRange to take into account radian unit
2018-04-10 11:26:43 +02:00
Émilie Feral
e94a1b1b86
[poincare] Add tests on Expression::sign properties
2018-03-22 10:48:06 +01:00
Émilie Feral
660775903f
[poincare] Add method Expression::characteristicXRange
2018-03-22 10:48:06 +01:00
Émilie Feral
1b10cbdbb3
[poincare] Add a method: Expression::polynomialDegree
2018-03-22 10:48:06 +01:00
Émilie Feral
6de71ae145
[poincare] Clean: convertFloatToText should be in PrintFloat instead of
...
Complex
2018-03-21 15:57:19 +01:00
Émilie Feral
d9150d4faa
[poincare] Integer: fix approximate, round instead of truncate integers
...
to closest float
2018-03-21 15:57:19 +01:00
Émilie Feral
4e3692f532
[poincare] Factorize code about IEEE754 conversion
2018-03-21 15:57:19 +01:00
Émilie Feral
26af09843e
[poincare] Enable writeTextInBuffer to work with different numbers of
...
significant digits
2018-01-30 19:14:42 +01:00
Émilie Feral
29a2525b56
[apps] Clean
2018-01-30 18:19:27 +01:00
Émilie Feral
4731cbd6e0
[poincare] Fix parenthesis addition on Complex object
...
Implement 'needParenthesisWithParent' instead of 'operandNeedParenthesis'
2018-01-30 16:17:03 +01:00
Émilie Feral
006a36c63c
[poincare] Fix operandNeedParenthesis
2018-01-30 16:17:03 +01:00
Émilie Feral
59fdcde548
[poincare] Avoid returning partial simplification when the
...
simplification process has been interrupted
2018-01-30 16:17:03 +01:00
Léa Saviot
214e490112
[poincare] Fixed grey squares bug when moving up in nested matrices.
...
Before, too many grey squares were added.
Change-Id: I0694dc943f82006fe3367dea9750d2feb83071ad
2018-01-29 18:09:42 +01:00
Léa Saviot
7fd3b965eb
[poincare] Fixed HorizontalLayout empty child removal.
...
Change-Id: Ic956a98b2637dafeda7c6e7476caa789ce398321
2018-01-29 17:07:26 +01:00
Léa Saviot
ab8140c1c3
[poincare] Pointer shouldRecomputeLayout mandatory for layout navigation
...
This fixes a bug.
Change-Id: I9bb5ff3a3f365865d85f89efcd970e3ac5096536
2018-01-26 11:36:34 +01:00
Léa Saviot
b9a7973961
[escher/poincare] Move the cursor when inserting a layout (if wanted).
...
The new pointed layout can be specified. If not, the cursor will be on
the right of the new layout.
Change-Id: I5e0c37cf6365447f8eaf354dc5e86a24c6981034
2018-01-24 10:18:12 +01:00
Léa Saviot
4d778b5d9f
[apps/escher/poincare] Use 2D Edition in Sequence and Graph apps.
...
EditableExpressionView is renamed ScrollableViewWithCursor.
EditableExpressionView is now a View that displays either a TextField or
a ScrollableViewWithCursor, depending on Poincare::Preferences.
Change-Id: Id44ddcd9a83f5fd17d65753ca4c94c5c7cda9b8a
2018-01-23 10:28:02 +01:00
Émilie Feral
0963254e03
[poincare] Fix confusion between Symbol::hasAnExactRepresentation and Symbol::isApproximative
2018-01-23 10:25:09 +01:00
Émilie Feral
b1bc6c97c6
[poincare] Add tests for Factor
2018-01-23 10:24:52 +01:00
Émilie Feral
45684d439b
[poincare] Arithmetic::PrimeFactorization returns special cases when the
...
factorization fails. factor(integer) can fail and returns Undefined
2018-01-23 10:24:52 +01:00
Émilie Feral
b9dce68f04
[poincare] Create class Factor
2018-01-23 10:24:52 +01:00
Émilie Feral
84b52fa090
[poincare] Create class Randint
2018-01-23 10:24:52 +01:00
Émilie Feral
868f53f65c
[poincare] Create class random
2018-01-23 10:24:52 +01:00
Léa Saviot
a6f93478cd
[poincare] Fix 1/2 3/4 serialization bug.
...
The omitted multiplication fix that serialized "1 2/3 4" into "1*2/3*4"
caused a bug and serialized "1/2 3/4" into "1/2**3/4", as well as
"1^2 3/4" into "1^(2)**3/4".
Change-Id: I59b55a2f13e6eceee68c7e52169c14918391f235
2018-01-19 15:58:07 +01:00
Léa Saviot
1ad4e6e744
[escher/poincare] Remove unneeded layout computation.
...
When moving a cursor in an EditableExpressionView, do not recompute the
layout, unless specified otherwise (for instance when entering or
exiting a MatrixLayout).
Change-Id: Ic2471095d6f6a08014a79f1d9d8fb7d39a1a6864
2018-01-18 17:55:16 +01:00
Léa Saviot
440709dace
[poincare] Better comment for isCollapsable in ExpressionLayout.
...
Change-Id: I944ec90a52b3b69e90c7a75163716c885ef256b4
2018-01-18 15:41:24 +01:00
Léa Saviot
7770f92df8
[poincare] canBeOmittedMultiplicationLeft/RightFactor for layouts.
...
Change-Id: I059226e95cb8d931ee65062965a888f4a06e67db
2018-01-18 15:41:24 +01:00
Léa Saviot
3cda4a881d
[poincare] Fix new power layout bug.
...
There was a problem when assessing if there was a need for an empty base
layout.
Change-Id: I9d6f84d3cc797fc0a701395dd8289590a4ab849a
2018-01-17 15:32:55 +01:00
Léa Saviot
8ab8ef4c5f
[apps/settings] Add a setting for the edition mode (1D or 2D).
...
Change-Id: Ia6783d3443a8b059e67a293a517bc652950aab55
2018-01-17 10:38:43 +01:00
Léa Saviot
62ae5840e9
[apps/poincare] Handle cursor positioning in EditableExpressionView.
...
There cursor was not in the right place for log(), cos(), ...
Change-Id: I8fe1f350f3054460204cb5d40508212642333e3e
2018-01-16 16:43:40 +01:00
Émilie Feral
02b15035fa
[poincare] Implementation of shallowReduce for Complex: when replacing
...
the ans symbol, we might introduce a Complex expression in the input
2018-01-16 15:17:16 +01:00
Émilie Feral
785c6a7329
[poincare] When replacing ans, add parenthesis if necessary
2018-01-16 15:17:16 +01:00
Émilie Feral
775432efdc
[poincare][apps] Replace Ans symbol when preprocessing the calculation
2018-01-16 15:17:16 +01:00
Émilie Feral
17fc7998a2
[apps] Calculation: Ans is exact only when the expression hold is exact
2018-01-16 15:17:16 +01:00
Émilie Feral
aa843bdb02
[poincare] Implement shallowReduce of stores and symbols
2018-01-16 15:17:16 +01:00
Émilie Feral
b8b7da7dd8
[apps] Calculation: Ans holds an exact expression
2018-01-16 15:17:16 +01:00
Émilie Feral
265453e3bb
[poincare] Improve the approximation of derivative
2018-01-16 13:24:09 +01:00
Léa Saviot
cb7b48adb6
[poincare] ExpressionArray is now a class, not a method.
...
Before, it was a method of Expression and returned a static array.
However, we have no guarantee that the function will not be called again
while the array is being used, thus erasing the previous array.
Change-Id: Ic640cee7edeb3b2805febde6287414a1497a5b4c
2018-01-16 12:18:48 +01:00
Émilie Feral
47eacfd555
[poincare] Power: when expanding multinome, cap the number of terms in
...
resulting sum at 25
2018-01-16 10:05:08 +01:00
Émilie Feral
b6c6fcb580
[poincare] Expand any multinome (a0+a1+...+am)^n which naive method
2018-01-16 10:05:08 +01:00
Émilie Feral
652c232ce3
[poincare] Power: expand Newton binomes
2018-01-16 10:05:08 +01:00
Émilie Feral
2cc432ac57
[poincare] Expose a method to compute the binomial coefficient
2018-01-16 10:05:08 +01:00
Léa Saviot
5ff32b8162
[expression_editor] Controller::handleAddEvent returns void.
...
Change-Id: Iaac5fd3d0798f5c2e81d3c982198f402534f6dfe
2018-01-15 11:58:07 +01:00
Léa Saviot
2ed72127cb
[poincare] Remove dangerous default arguments in poincare.
...
Change-Id: I76f2bc057d73c7d151aed62b66eb69a91082910c
2018-01-15 11:58:07 +01:00
Léa Saviot
16fad9f9fb
[poincare] Cleaned backspaceAtCursor for layouts.
...
Change-Id: I232fa7af24a9983d3acfb3460042cb32bfcef81f
2018-01-15 11:58:07 +01:00
Léa Saviot
bf4ccd76ea
[poincare] Show grey squares in a matrix only if the cursor is in it.
...
Change-Id: I2e622de51a9c7af7b676ae9bd7bb3e9681f5d051
2018-01-15 11:58:07 +01:00
Léa Saviot
955c69f0b2
[poincare] Changed isEmpty() in DynamicLayoutHierarchy.
...
A DynamicLayoutHierarchy with only an empty children is not empty, but
an horizontal layout with only an empty children is empty.
Also, a DynamicLayoutHierarchy with no children is not empty (it should
always be an intermediary state before adding children).
Change-Id: I47b32379f42a95666d75df4d3ba79fabc34d2edc
2018-01-15 11:58:07 +01:00
Léa Saviot
f95bb46cc3
[poincare] Cleaned ExpressionLayout class.
...
Change-Id: I03a49e1a2b199a70608792f0358ddde5a86118d6
2018-01-15 11:58:07 +01:00