Léa Saviot
52ae2a2643
[apps/calc] approximateOutput handles unparsable m_approximateOutputText
...
This fixes a crash when computing:
[[1, 0, -1, 0][0, 1, 1, 0][0, 2, 0, 1][1, 0, 0, 1]]^(-1)
2019-04-12 15:16:05 +02:00
Romain Goyet
4f2c7a3763
[build] Update the i18n processing to fit the out-of-tree build
2019-03-06 15:00:59 +01:00
Romain Goyet
4f1d74f44b
[build] Use an out-of-tree build
2019-03-06 15:00:59 +01:00
Émilie Feral
7b5f3c570d
[poincare] Change the way Expression are built
2019-02-21 11:29:35 +01:00
Ruben Dashyan
0943406263
Fix HistoryViewCell and ScrollableExactApproximateExxpressionsCell margins issue
...
Remove all margins from those cells.
Rather add margins to their respective subviews:
- ScrollableExpressionView
- ScrollableExactApproximateExpressionsView.
As a notable consequence, the distance in HistoryViewCell between its
subviews becomes 10 instead of 5.
In passing, replace
- Metric::HistoryHorizontalMargin = 10
- ScrollableExactApproximateExpressionsView::k_digitHorizontalMargin = 10
- HistoryViewCell::k_digitVerticalMargin = 5
- ScrollableExactApproximateExpressionsCell::k_margin = 5
by
- Metric::CommonSmallMargin = 5
- Metric::CommonLargeMargin = 10.
2019-02-18 16:49:58 +01:00
Ruben Dashyan
98e00404b8
[apps/calculation] Enable arrow scrolling indicators and add horizontal margin
2019-02-18 16:49:58 +01:00
Ruben Dashyan
da0d42ca3b
[apps/calculation/history_view_cell] Fix background colors
...
Set m_inputView's m_expressionView's background color
2019-02-18 16:49:58 +01:00
Ruben Dashyan
7a977f5689
[apps/calculation] Remove redundancy
...
In HistoryController::willDisplayCellForIndex, both setCalculation and
reloadCell end up calling ScrollableExpressionView::layoutSubviews.
Indeed, setCalculation calls setLayout over m_inputView, which in turn
calls layoutSubviews. It is logical to remove the first occurence.
2019-02-18 16:49:58 +01:00
Ruben Dashyan
08e8bf0eeb
[escher] Implement ScrollView::minimalSizeForOptimalDisplay including margins
...
Remove from derived classes:
- apps/calculation/scrollable_expression_view
- apps/code/consol_line_cell
- apps/shared/scrollable_exact_approximate_expressions_view
- escher/layout_field
- escher/table_view
- escher/text_field
2019-02-18 16:49:58 +01:00
Ruben Dashyan
0e0b49acce
[apps/calculation] Remove HistoryViewCell horizontal margins
2019-02-18 16:49:58 +01:00
Ruben Dashyan
faae55eb51
[escher/scroll_view] Replace setShowsIndicators by setDecoratorType
2019-02-18 16:49:58 +01:00
Ruben Dashyan
8029aab060
[apps/calculation] Remove unecessary namespace
2019-02-18 16:49:58 +01:00
Léa Saviot
31866aaaf5
[apps/calculation] Fix display of unreal
...
For instance ln(-2) in real mode should display "unreal"
2019-01-21 11:59:20 +01:00
Léa Saviot
be3ab70e67
[apps/calculation] Do not display approximation if it is unreal
...
Fixes: sqrt(-1) in real complex format, then change complex format, it
then displays unreal = undef
2019-01-10 11:42:05 +01:00
Léa Saviot
027148f376
[apps/calculation] Clean comments
2019-01-10 11:42:05 +01:00
Léa Saviot
271e22628b
Typo in comment
2019-01-10 11:42:05 +01:00
Léa Saviot
892dd2de4f
[apps/poincare] Clean some comments
2019-01-10 11:42:04 +01:00
Léa Saviot
101db272c8
[test/calculation] 1+1->a shoud display 2, not 1+1=2
2019-01-10 11:42:04 +01:00
Émilie Feral
95248edde0
[poincare] Fix tests with new beautify order
2019-01-10 11:42:04 +01:00
Émilie Feral
fe8825df35
[shared] PoincareHelpers: update the complexFormat (force it to
...
Cartesian with complex input).
2019-01-10 11:42:04 +01:00
Émilie Feral
b8826b1cf4
[poincare] (-1)^(p/q) is not reduced the same way according to the
...
complex format
2019-01-10 11:42:04 +01:00
Émilie Feral
786cefc3d4
[calculation] No special case for unreal calculation, it is handled in
...
simplication and approximation routines.
2019-01-10 11:42:04 +01:00
Émilie Feral
26e2e9be0d
[poincare] Add complex format as an argument of simplification
2019-01-10 11:42:04 +01:00
Émilie Feral
6fd3a155df
[calculation] Take into account the complex format 'real'
2019-01-10 11:42:04 +01:00
Émilie Feral
b6ec84f6a9
[calculation] Clean and add tests on CalculationStore
2019-01-10 11:42:04 +01:00
Émilie Feral
c6039423a9
[poincare] When simplifying an expression, also compute the approximation from the reduced
...
expression to avoid loss of precision.
If an expression is reduced to a ComplexCartesian(a, b), we compute the
approximation from ComplexCartesian(a,b) instead of going through the
potentially complicated expression resulting from beautifying
(sqrt(a^2+b^2)*exp(i*(arctan(b/a) -Pi/2*sign(b)) for example)
2019-01-10 11:42:03 +01:00
Émilie Feral
383ac004cf
[poincare] Take into account complex format in simplify
2019-01-10 11:42:03 +01:00
Émilie Feral
9efc9e02e6
[poincare] Revert simplifyForComplexFormat
2019-01-10 11:42:03 +01:00
Émilie Feral
8f63416097
[calculation] Fix Calculation operator ==
2019-01-10 11:42:03 +01:00
Émilie Feral
79e7fb2183
[calculation] Use ParseAndSimplifyForComplexFormat instead of
...
ParseAndSimplify
2019-01-10 11:42:03 +01:00
Léa Saviot
56504525c9
[Makfile] Remove superfluous test_objs
...
We now build all objects even for test, so we do not need most of the
previous test_objs
2018-12-19 09:44:58 +01:00
Émilie Feral
f7193602ef
[calculation] Bug in the subview selected with heigh cells
...
In SelectableTableView::selectCellAtLocation, we call 'tableViewDidChangeSelection'
before scrolling. Therefore, the cell with updated with the right selected subview
is not the one drawn... To solve this issue, we keep the selectedSubview ('model')
in the HistoryController instead of in the limited-lifespan view.
2018-12-06 14:52:23 +01:00
Léa Saviot
70a4542705
[apps/calc] Add test on shouldOnlyDisplayApproximateOutput
2018-12-03 15:03:24 +00:00
Léa Saviot
fb44f8617c
[apps/calculation] Fix display exact and approx results
...
If the results are equal but their layouts not, because of the number of
significant digits for instance, display both the equal and approximate
results.
2018-12-03 12:32:51 +00:00
Émilie Feral
cf92eb8506
[poincare] Discard useless argument 'replaceSymbols' from simplification
...
routine
2018-11-30 09:53:31 +01:00
Émilie Feral
55be86ef50
[escher] TableView::cellAtLocation should return nullptr if the cell is
...
invisible and therefore no view displays it.
Fix bug: add 4 functions, in the values table one cell is wrong as soon
as you edit an x value
2018-11-26 11:24:30 +01:00
Léa Saviot
53e4a290f7
[poincare] Rename Expression:parse in Parse
2018-11-23 12:04:09 +01:00
Léa Saviot
94603b2b7d
[poincare] Layout::serialize is serializeForParsing or ParsedExpression
...
serializeForParsing serializes the layout once,
serializeParsedExpression serializes the layout, parses it and
serializes it again.
2018-11-23 12:04:09 +01:00
Léa Saviot
79e3842e2d
[apps/calculation] Add matrix test in calculation_display_exact_approximate
2018-11-23 12:04:09 +01:00
Léa Saviot
2f8bd5a241
[apps/Calculation] Fix forgotten namespace
2018-11-23 12:04:09 +01:00
Léa Saviot
33676e915a
[apps] Check that serialized expression is not too long in Graph
2018-11-23 12:04:09 +01:00
Léa Saviot
f5586b3d36
[apps] Clean the syntax error warning displaying
2018-11-23 12:04:09 +01:00
Léa Saviot
51ddba058f
[apps] Add test about Calculation output: 2x-x should just display x
2018-11-23 12:04:08 +01:00
Léa Saviot
a289d77425
[apps/calculation] Fix non returning method
2018-11-23 12:04:08 +01:00
Léa Saviot
63e83c246b
[poincare] Undefined::Name() gives "undef"
2018-11-23 12:04:08 +01:00
Léa Saviot
1cb9d5445c
[apps/calculation] Do not display approximate output if it is undef
2018-11-23 12:04:08 +01:00
Léa Saviot
f6804c2d67
[apps] Use ExpressionFieldDelegateApp methods in Calculation::App
...
For methods textFieldDidReceiveEvent and layoutFieldDidReceiveEvent
2018-11-23 12:04:08 +01:00
Léa Saviot
789d17189e
[apps/calculation] Comment why shouldOnlyDisplayExactOutput is needed
2018-11-23 12:04:07 +01:00
Léa Saviot
5d6db930fd
[apps/calc] Fix display glitch when doing 1.2->a (cell not high enough)
2018-11-23 12:04:07 +01:00
Léa Saviot
8a272458de
[poincare] recursivelyMatches takes replaceSymbols parameter
...
This fixes:
[7]->a
1+2->a
The second operation would get interrupted because 'a' is a matrix if
symbols are replaced
2018-11-23 12:04:07 +01:00