Léa Saviot
313cbf6767
[poincare/arithmetic] Shortcut the LCM and GCD computation if equal
...
This fixes: LCM(7.88861e+169, 7.88861e+169), which overflowed at some
point during the computation
2020-03-13 14:16:43 +01:00
Léa Saviot
97d94d9e56
[poincare/test] Add failing test on multiplication simplification
2020-03-13 14:16:43 +01:00
LeaNumworks
13b2deb714
[poincare/approximation_helper] Clearer code
...
This should do the same output.
2020-03-12 14:41:50 +01:00
Léa Saviot
576d1dcd6b
[poincare/power] Rename and comment computeRealRootOfRationalPow
2020-03-12 14:41:50 +01:00
Léa Saviot
175af27ea9
[poincare/approximation_helper] Factorize some code
2020-03-12 14:41:50 +01:00
Émilie Feral
879c1e3bf1
[poincare] ApproximationHelper: fix precision threshold of
...
NeglectRealOrImaginaryPartIfNeglectable
2020-03-12 14:41:50 +01:00
Émilie Feral
d431642e60
[poincare] Add tests on atanh approximation
2020-03-12 14:41:50 +01:00
Émilie Feral
a2e9d8efd6
[poincare] Improve trigonometry functions and power functions
...
approximations. We neglect the real or imaginary parts when it is
neglectable compared to the input.
2020-03-12 14:41:50 +01:00
Émilie Feral
9936d99411
[poincare] Add comment on Power::templatedApproximate
2020-03-12 14:41:50 +01:00
Émilie Feral
12a5f5499c
[poincare] Handle real root finding in Power and NthRoot in order to
...
remove beautifying x^(p/q) -> root(x,q)^p. This triggered precision
loss!
2020-03-12 14:41:50 +01:00
Émilie Feral
5407709798
[poincare] Add approximation tests that fails because of precision loss
2020-03-12 14:41:50 +01:00
Émilie Feral
515405a5df
[poincare] In Power::approximation and SquareRoot::approximation, the
...
real (or imaginary) part negligence should depend on the argument value
relatively to some other values (norms of the parameters) and not of its
value absolutely!
2020-03-12 14:41:50 +01:00
Léa Saviot
ebdac63681
[poincare/parser] u_ v_ w_ are not special identifiers anymore
2020-03-12 11:48:54 +01:00
Léa Saviot
90f2e5beed
[ion/sdl] Do not process more than one buffered event
...
Scenario:
Make an infinite loop script (while 1 : 1+1) and run it. Input 1234567
then press Back to interrupt the infinite loop -> the script execution
stops, then 1234567 is input in the input line, which is quite weird. It
is even weirder when the key pressed during the [script execution / a
long computation] result in navigation inside the calculator apps.
2020-03-11 15:36:52 +01:00
Léa Saviot
9ab3558cfe
[ion/events_keyboard] Remove unused cases
2020-03-11 15:36:52 +01:00
Léa Saviot
1242258992
[ion] Handle key events in all simulators as in EPSILON_SDL_SCREEN_ONLY
...
This way, physical keyboard events can be caught by python on all
simulators
2020-03-11 15:36:52 +01:00
Léa Saviot
4a4ba52e38
[ion/events] Better handling of Shift on the web target
2020-03-11 15:36:52 +01:00
Léa Saviot
18f3054b50
[ion/simulator/web] Do not duplicate events in scan and getPlatformEvent
...
Some events were caught by bith scan() and getPlatformEvent()
2020-03-11 15:36:52 +01:00
Léa Saviot
a7d419c4bd
[ion/emscripten] Get physical keyboard events in scan()
2020-03-11 15:36:52 +01:00
Léa Saviot
8168a125e6
[apps/statistics] Remove unused variable in HistogramView
...
It is unused as HistogramView now inherits Shared::HorizontallyLabeledCurveView
2020-03-11 13:58:41 +01:00
Léa Saviot
702772a7c9
[apps/reg] Store::m_seriesChecksum is Snapshot::m_prevModelsVersions
...
Share these objects instead of duplicating them
2020-03-11 11:43:36 +01:00
Léa Saviot
53705fb333
[apps/graph_ctrlr] Reload range if no previous model is present
...
We memoize the checksum of the x first models, and we check that one of
these models is still present when the graph view appears. If so, we do
not reload the range, other wise we reload it.
Scenario:
f(t) = [t^2 t+1] in parametric
Display the graph
f(x) = 1 on ]-inf;0]
g(x) = 2 on [0;inf[
Display the graph -> the range did not change
2020-03-11 11:43:36 +01:00
Léa Saviot
aab8974934
[apps] Memoize five model checksums
2020-03-11 11:43:36 +01:00
Romain Goyet
2bf83c43a8
[apps/shared] Factorize CurveView::label
...
There was a lot of code duplication.
I removed the initialization of xLabel{} and yLabels{} because those are
scratch buffers that shouldn't be accessed before being written to
anyway.
2020-03-11 09:51:33 +01:00
Léa Saviot
ef249b0bdb
[poincare/parser] parseSpecialId must go through one of the subcases
...
Otherwise we might go through the method without creating leftHandSide
2020-03-10 11:35:37 +01:00
Léa Saviot
79f3ee43bc
[poincare/parser] log_ is not a special identifier anymore
...
The change was made a few commits ago, but this was forgotten
2020-03-10 11:35:37 +01:00
Ruben Dashyan
1ca902c129
[apps/shared/round_cursor_view] Comment about markRectAsDirty
2020-03-10 11:11:57 +01:00
Ruben Dashyan
037fa088e9
[escher/transparent_view] markRectAsDirty is protected
...
as it is in View.
2020-03-10 11:11:57 +01:00
Ruben Dashyan
d64e58b9dc
[escher/transparent_view] Remove redundancy
2020-03-10 11:11:57 +01:00
Ruben Dashyan
8337e36f46
[apps/shared/*_cursor_view] CursorView inherits from TransparentView
...
so that CursorView tells its superview to redrawn in the background,
except the RoundCursorView.
2020-03-10 11:11:57 +01:00
Ruben Dashyan
ed98218e7b
[poincare/grid_layout] Explicit the making of a protected member as public
2020-03-10 10:33:30 +01:00
Ruben Dashyan
aa4a33d849
[poincare/layout_node] Remove unused method
2020-03-10 10:33:30 +01:00
Ruben Dashyan
afb1d18d65
[apps/shared/sum_graph_controller] Factor constexpr
2020-03-10 10:33:30 +01:00
Ruben Dashyan
f0ef84b3bc
[apps/shared/sum_graph_controller] In LegendView::setSumLayout, factor Layout building
2020-03-10 10:33:30 +01:00
Ruben Dashyan
55bb3f677a
[apps/shared/sum_graph_controller] In LegendView::setSumLayout, simplify equal sign
2020-03-10 10:33:30 +01:00
Ruben Dashyan
0a92579571
[apps/shared/sum_graph_controller] Fix variable type
2020-03-10 10:33:30 +01:00
Ruben Dashyan
04794dd26f
[apps/shared/sum_graph_controller] Uniformize number of significant digits
2020-03-10 10:33:30 +01:00
Ruben Dashyan
7ee8c31c70
[apps/shared/sum_graph_controller] In LegendView::setSumLayout, factor sum symbol layout
2020-03-10 10:33:30 +01:00
Ruben Dashyan
24fa8b28a9
[apps/shared/sum_graph_controller] In LegendView::setSumLayout, factor m_sum.setAlignment
2020-03-10 10:33:30 +01:00
Ruben Dashyan
6b527d3b00
[apps/shared/sum_graph_controller] Rename setSumSymbol to setSumLayout
2020-03-10 10:33:30 +01:00
Ruben Dashyan
e1624c79aa
[apps/shared/sum_graph_controller] Class doesn't need to hold m_sumLayout
2020-03-10 10:33:30 +01:00
Ruben Dashyan
7a633b1e75
[apps/sequence/sequence] SequenceModel's name method need not be virtual
2020-03-10 10:33:30 +01:00
Ruben Dashyan
fccd72b757
[apps/sequence/sequence] Do not memoize nameLayout
...
Fixes the following bug:
In the graph tab of the Sequence app, compute the sum of the terms of
a sequence from 1 to 9 and then from 1 to 10. The Layout is memoized
after the first time and mispositioned the second time since it is
not recomputed.
2020-03-10 10:33:30 +01:00
Romain Goyet
c1215063ee
Small fixes to the documentation
2020-03-10 10:26:49 +01:00
Léa Saviot
cf84a30768
[poincare/absolute_value] ShallowReduce done in double, not float
...
This fixes abs(-2.3*10^-39) that returned a negative value
2020-03-10 10:23:33 +01:00
Léa Saviot
5ca6b7dbf8
[poincare/code_point_layout] Fix collapsing
...
Scenario: Enter "(12/34 * 10)" then press "Divide" -> the numerator of
the division was not the whole parenthesed expression
2020-03-09 16:41:58 +01:00
Léa Saviot
1dc6e77049
[poincare/matrix] Forbid nested matrices
...
Scenario: in calculation,
1/matrix(matrix(matrix(matrix(... matrix(1) ... )))) gave kind of a
weird result. These kind of computations also broke the fuzzer.
2020-03-04 16:21:25 +01:00
redgl0w
dfe51df321
Updated the month definition
2020-03-04 10:08:44 +01:00
redgl0w
035a0377bd
Updated the month definition
2020-03-04 10:08:44 +01:00
Léa Saviot
4f76e4418f
[apps/console_edit_cell] Fix input result copying
2020-03-02 17:24:54 +01:00