Ruben Dashyan
f9e419dcd6
[poincare/expression] defaultDeepReduceChildren does not recompute the number of children
2020-02-12 15:13:23 +01:00
Ruben Dashyan
8f31f56544
[poincare/unit] Fix pressure units
2020-02-12 15:13:23 +01:00
Émilie Feral
855cec527f
[poincare] Power: remove rule i^(p/q) -> e^(i*Pi*p/2q).
...
This is handles in ComplexCartesian class when the simplification target
is the user and it doesn't need to be handled for other simplification
targets (we even prefer the first form).
2020-02-12 15:13:23 +01:00
Émilie Feral
1f02e8e381
[poincare] AbsoluteValue: add rule |x*y| --> |x|*|y| and |x^y| --> |x|^y
2020-02-12 15:13:23 +01:00
Ruben Dashyan
3692c083e2
[poincare/unit] Simplify shallowReduce
2020-02-12 15:13:23 +01:00
Ruben Dashyan
cadc409561
[poincare/unit] Avoid non-necessary cloning in shallowReduce
2020-02-12 15:13:23 +01:00
Ruben Dashyan
2c4160e59c
[poincare/unit] Fix shallowReduce
...
The result had non-reduced child.
2020-02-12 15:13:23 +01:00
Émilie Feral
bbb9e83703
[apps/calculation] Fix and add tests
2020-02-12 15:13:23 +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
5631ef6ad0
[poincare/multiplication] Fix typo in shallowBeautify
2020-02-12 15:13:23 +01:00
Ruben Dashyan
b3f4dcb13d
[poincare/unit] Fix electron-volt unit definition
2020-02-12 15:13:23 +01:00
Ruben Dashyan
054aac2c1c
[poincare/expression] Equalize simplified and approximate output in presence of units
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
Ruben Dashyan
a9ca60338c
[poincare] Beautify Unit products according to value's order of magnitude
2020-02-12 15:13:23 +01:00
Ruben Dashyan
380e6fff3d
[poincare/unit] Improve Tree log
2020-02-12 15:13:23 +01:00
Ruben Dashyan
e6009250de
[poincare/test/parsing] Fix Parser usage
2020-02-12 15:13:23 +01:00
Émilie Feral
4b98652ed9
[poincare] Parser: Context is now a member variable of the Parser class
...
instead of being given as a parameter in all methods
2020-02-12 15:13:23 +01:00
Émilie Feral
ba4f9297d4
[poincare] Test: add parsing tests for units
2020-02-12 15:13:23 +01:00
Émilie Feral
99481e7a28
[poincare] Unit: avoid useless parentheses addition in before deep
...
reducing
2020-02-12 15:13:23 +01:00
Émilie Feral
489901a613
[poincare] Units are now prefixed by "_" to distinct them from user
...
variable
2020-02-12 15:13:22 +01:00
Émilie Feral
313430ec97
[poincare] Expression: add comment for future improvement
2020-02-12 15:13:22 +01:00
Émilie Feral
bf73b69808
[poincare] Units: change signature of serialize to follow same
...
conventions as Expression::serialize
2020-02-12 15:13:22 +01:00
Émilie Feral
3428e0aa6f
[poincare] Decimal: strlcpy returns the length of the source even if the
...
copy was partially completed. Always return the real copied length in
Decimal::convertToText.
2020-02-12 15:13:22 +01:00
Ruben Dashyan
eba529d5ee
[poincare/multiplication] Optimize shallowBeautify for units: do not use deepReduce repeatedly
2020-02-12 15:13:22 +01:00
Ruben Dashyan
8f41bd7cd0
[poincare/multiplication] shallowBeautify recognizes derived units
2020-02-12 15:13:22 +01:00
Ruben Dashyan
300399fe4d
[poincare/expression] deepBeautify bubbles up Undefined children
2020-02-12 15:13:22 +01:00
Ruben Dashyan
454bfc4f36
[poincare/multiplication] Units always stay in the numerator
2020-02-12 15:13:22 +01:00
Ruben Dashyan
cb638a8126
[poincare/power] Units always stay in the numerator
2020-02-12 15:13:22 +01:00
Ruben Dashyan
97508c155c
[poincare/test/parsing] Test parsing of unit symbols
2020-02-12 15:13:22 +01:00
Ruben Dashyan
1f3abec05e
[poincare/parser] Parse unit symbols
2020-02-12 15:13:22 +01:00
Ruben Dashyan
92d17145b2
[poincare] Define Unit class
2020-02-12 15:13:22 +01:00
Émilie Feral
a82ff2b703
[apps/calculation] HistoryController: in historyViewCellDidChangeSelection,
...
limit the whole table reloading to cases where the cell height did
actually change to avoid useless blinking
2020-02-12 15:13:22 +01:00
Émilie Feral
71de56f87a
[apps/calculation] HistoryViewCell: fix setHighlighted to reload
...
subviews highlight
2020-02-12 15:13:22 +01:00
Émilie Feral
b39b8da036
[apps/calculation] HistoryViewCell: prevent from selecting ellipsis
...
suview if it not visible
2020-02-12 15:13:22 +01:00
Émilie Feral
a39ca58470
[apps/calculation] HistoryViewCell: fix first responder. The first
...
responder is the HistoryViewCell when the ellipsis subview is selected
2020-02-12 15:13:22 +01:00
Émilie Feral
767d1654cc
[apps/calculation] HistoryViewCell: select the right expression of
...
output when coming from ellipsis subview
2020-02-12 15:13:22 +01:00
Émilie Feral
39dbb7d68c
[apps/calculation] Fix relayouting when highlighted cell changed
...
This fixes the following scenario: add "1.2" 5 times, go up three times,
and down three times, the last cell was not correctly relayout.
2020-02-12 15:13:22 +01:00
Léa Saviot
86bd4be03e
[python/port] Fix gc_collect_root on emscripten
...
Any data access should be aligned.
2020-02-12 15:13:22 +01:00
Léa Saviot
d70c4c7205
[ion] Typo
2020-02-12 15:13:22 +01:00
Léa Saviot
40ed9b3557
Revert "[eshcer/layout_field] Factor handleEvent"
...
This reverts commit d1ebbc685d67702994aa3ef822886a681cee63b9.
There were problems in the calculation app for instance:
- Write 34 then press ans -> the cursor is not drawn right of ans, but
left.
- Write a large layout, go up in th history, then go back to edition:
the view is not scrolled to the cursor
2020-02-12 15:13:22 +01:00
Léa Saviot
8554bbd8c8
[poincare/layout_cursor] Fix cursor position after adding square root
...
Scenario:
Go to the 'Calculation' app
Type 'sqrt(sqrt(i))', by pressing the square button twice and then the i button
Press OK
Scroll up, and press OK
Press left until the cursor is right before the i.
Press "sqrt" : the root is added, but the cursor jumped to the right of the i.
The cursor should have stayed on the left of the i.
Note: The behavior is correct when you type the entire expression straight away by doing the following:
Press "sqrt", "sqrt", "i"
Press "left", so the cursor is right before the i
Press "sqrt" again. At this point, the cursor remains on the left of i.
2020-02-12 15:13:22 +01:00
Émilie Feral
bbe39aac14
[apps/calculation] HistoryController: display additional results pop-up
...
when handling OK/exe on the ellipsis view
2020-02-12 15:13:22 +01:00
Émilie Feral
7d0a1cd0b2
[apps/calculation] HistoryViewCell: enable selecting the ellipsis
2020-02-12 15:13:22 +01:00
Émilie Feral
9a97fc01b2
[apps/calculation] HistoryViewCell: m_expandedCalculation memoizes true
...
only when the calculation is actually expanded (when the output is
selected and the display output is ExactApproximateToggle)
This avoid blinking when changing input/output selection
2020-02-12 15:13:22 +01:00
Émilie Feral
f276a88e79
[apps/calculation] HistoryViewCell: display ellipsis view when
...
highlighted
2020-02-12 15:13:22 +01:00
Émilie Feral
b56cd8b012
[escher] Metric: add EllipsisCellWidth. This will be soon used by
...
Calculation::HistoryCell
2020-02-12 15:13:22 +01:00
Émilie Feral
251db5b60e
[apps/shared][apps/calculation] Change class names:
...
ScrollableInputExactApproximateExpressionsCell -->
ScrollableThreeExpressionsCell
AbstractScrollableExactApproximateExpressionsView -->
AbstractScrollableMultipleExpressionsView
ScrollableExactApproximateExpressionsView -->
ScrollableTwoExpressionsView
ScrollableInputExactApproximateExpressionsView -->
ScrollableTwoExpressionsCell
2020-02-12 15:13:22 +01:00
Émilie Feral
87e4836196
[apps/calculation][apps/shared]
...
AbstractScrollableExactApproximateExpressionsView children classes
reload scroll after reloading the subview selection when entering the
responder chain and when cell becomes first responder. We don't reload
scroll when setting content of cells as this is done every time we
relayout - when scrolling in the table for instance.
2020-02-12 15:13:22 +01:00
Émilie Feral
ef5681ec0b
[escher] Remove BurgerMenuView
2020-02-12 15:13:22 +01:00