Commit Graph

12110 Commits

Author SHA1 Message Date
Hugo Saint-Vignes
e09bd0a18c [poincare] Factorize reduce and removeUnit methods 2020-12-22 17:32:40 +01:00
Hugo Saint-Vignes
7146eff7ee [poincare/src] Use reduce before removeUnit
With deepReduce(), when a simplifiaction was interrupted, expression could
contain Undefined children, which would trigger the assert in
removeUnit(). With reduce(), if a simplification is interrupted, the
entire expression becomes Undefined, which is handled by removeUnits().
2020-12-22 17:32:40 +01:00
Gabriel Ozouf
5bc9579db6 [shared/interactive_curve_view_range] Test zoom method 2020-12-22 17:22:33 +01:00
Gabriel Ozouf
e9c953fd6e [shared/interact_curve_view_range] Check orthonormality after zoom
Zooming in and out on a graph usually preserves orthonormality. However,
if the window has its bounds close to the limits for the values on the
axes, zooming can change the ratio.
2020-12-22 17:22:33 +01:00
Gabriel Ozouf
02d7a02a93 [poincare/unit] Add test 2020-12-22 17:21:37 +01:00
Gabriel Ozouf
9b3f7edfcd [poincare/unit] Handle kelvin with prefix
Units derived from kelvin (mK, cK, ...) were handled like Celsius and
Fahrenheit, causing a bug where multiplications such as 2*pi*_cK to
simplify as undef.
2020-12-22 17:21:37 +01:00
Hugo Saint-Vignes
fa523c25c9 [apps] Split italian text into two lines in variable box 2020-12-22 10:16:27 +01:00
Hugo Saint-Vignes
1939293cd2 [apps/shared] Add margin to avoid visible approximation errors 2020-12-21 16:12:27 +01:00
Léa Saviot
60f875220e build: Version 15.2.0 2020-12-17 17:10:56 +01:00
Gabriel Ozouf
24456780e6 [regression] Invalidate cursor when selected dot does not exist 2020-12-17 17:10:56 +01:00
Hugo Saint-Vignes
af3b2d4de4 [apps/shared] Tidy model name on sequence type change 2020-12-17 17:10:56 +01:00
Hugo Saint-Vignes
479f34502f [apps/shared] Rename methods and Factorize comparison logic 2020-12-16 16:16:26 +01:00
Hugo Saint-Vignes
10c296e671 [apps/shared] Add comment for isCursorHanging method 2020-12-16 16:16:26 +01:00
Hugo Saint-Vignes
b7bbb258a8 [apps/regression] Fix NaN comparison in isCursorHanging method 2020-12-16 16:16:26 +01:00
Hugo Saint-Vignes
7646f13ca8 [apps/shared] Fix NaN comparison in isCursorHanging method 2020-12-16 16:16:26 +01:00
Hugo Saint-Vignes
56a6917cfd [apps/shared] Fix context pointer when sorting rows 2020-12-16 11:40:54 +01:00
Gabriel Ozouf
efbbbe94ff [poincare/expression] Comment and variable names 2020-12-14 10:20:09 +01:00
Gabriel Ozouf
c7b758f536 [poincare/expression] Fix solutions to e^x=0
Because of the limitations of the floating-point representation, e^x is
null for x <= 710, causing the nextRoot functions to find roots for it.
To prevent this, we looking for places where a function changes sign, we
actually require the function to take two non-null values of different
signs.
2020-12-14 10:20:09 +01:00
Hugo Saint-Vignes
78cb340065 [apps/regression] Only uniformize c if needed 2020-12-10 16:42:59 +01:00
Hugo Saint-Vignes
6e318593ae [apps/regression] Code review fixes 2020-12-10 16:42:59 +01:00
Hugo Saint-Vignes
79e59f525e [apps/regression] Ensure unicity for trigonometric regression 2020-12-10 16:42:59 +01:00
Gabriel Ozouf
94b2da8e60 [poincare/zoom] Comment on the representation of ranges 2020-12-10 13:45:56 +01:00
Gabriel Ozouf
185c780215 [poincare/zoom] Handle NAN in ExpandSparseWindow 2020-12-10 13:45:56 +01:00
Gabriel Ozouf
35bfb8ec16 [poincare/zoom] Method ExpandSparseWindow
This method is used to remove extraneous empty sapce in the middle of
the window for functions that are discontinuous between their points of
interest.
2020-12-10 13:45:56 +01:00
Gabriel Ozouf
625a89e610 [poincare/zoom] RefinedYRangeForDisplay signature 2020-12-10 13:45:56 +01:00
Gabriel Ozouf
3cdb076c2c [shared/interactive_curve_view_range] Factor zoom
The zoom method to zoom in and out on a curve view make use of the
SetZoom method in Poincare::Zoom.
2020-12-10 13:45:56 +01:00
Gabriel Ozouf
71070ee052 [poincare/zoom] Helper method SetZoom
Create a method SetZoom to zoom in and out on a window.
2020-12-10 13:45:56 +01:00
Hugo Saint-Vignes
c28a5198d6 [apps/regression/test] Add a test case, factorize logic 2020-12-09 17:31:14 +01:00
Hugo Saint-Vignes
a08e3e1024 [apps/regression] Update comment 2020-12-09 17:31:14 +01:00
Hugo Saint-Vignes
357db4493d [apps/regression] Add TODO to improve coefficient update 2020-12-09 17:31:14 +01:00
Hugo Saint-Vignes
e17ff842b5 [apps/regression/test] Update trigonometric tests 2020-12-09 17:31:14 +01:00
Hugo Saint-Vignes
d0f40f0177 [apps/regression] Set coefficient c initial value to 0 2020-12-09 17:31:14 +01:00
Émilie Feral
fe4e2e3e9d Misc. clang static analyzer fixes 2020-12-09 13:34:36 +01:00
Martijn Oost
c3ceb0074f [NL] fix translation mistakes 2020-12-09 13:31:15 +01:00
Émilie Feral
0f95b579a4 build: Version 15.1.0 2020-12-07 17:13:14 +01:00
Gabriel Ozouf
55f21f127c [poincare/zoom] Fix array overflow 2020-12-07 16:45:54 +01:00
Gabriel Ozouf
89979b4f50 [poincare/zoom] Comment on the RangeWithRatio method 2020-12-07 15:58:56 +01:00
Gabriel Ozouf
71be09b4e7 [poincare, graph] Factor helper function 2020-12-07 15:58:56 +01:00
Gabriel Ozouf
ffebd2e987 [shared] Rename methods 2020-12-07 15:58:56 +01:00
Gabriel Ozouf
1f8ab10ae5 [graph] Update tests on automatic zoom 2020-12-07 15:58:56 +01:00
Gabriel Ozouf
8726bbda3e [poincare/zoom] Update tests 2020-12-07 15:58:56 +01:00
Gabriel Ozouf
072fdda6b8 [poincare/zoom] Redraft search of orthonormal range
To find the optimal range with a specified ratio, we compute the values
of the function on a default range, then center the Y axis to display
the maximum number of points of the function.
2020-12-07 15:58:56 +01:00
Gabriel Ozouf
316d054935 [sequence] Restore margins on the sequence graph 2020-12-07 15:58:56 +01:00
Gabriel Ozouf
f3b770cb29 [graph] Add tests for the full range computation
Change-Id: I040a36c035ec75ee950f1998667b70a417dea2f3
2020-12-07 15:58:56 +01:00
Gabriel Ozouf
a9aeae94df [shared] Create helper functions for ranges
These functions are used to test the full algorithm used to compute
ranges.

Change-Id: I48069e245aa6e879f66aecc29709fc6f992f5220
2020-12-07 15:58:56 +01:00
Gabriel Ozouf
1e7babadb8 [solver] Change angle unit before test
A test in equation_solve relies on the angle unit being set to Degree,
but doesn't actually set it. Changing the angle unit to another one in a
test prior would break this test.

Change-Id: I6785b087f171d46226d484ebaa3ebdc9e791cedc
2020-12-07 15:58:56 +01:00
Gabriel Ozouf
7f63daa28e [poincare/zoom] Change weight function in RangeWithRatioForDisplay
Change-Id: I21520d8220083b40baa2e4928632632f2b73cb9b
2020-12-07 15:58:56 +01:00
Gabriel Ozouf
b1da6031c6 [shared] Do not compute range for convoluted functions
Evaluating a function containing a sequence, an integral or a
derivative, is time consuming. Computing a range requires a plethora of
evaluations, as such ranges for these functions cannot be evaluated in a
timely fashion.

Change-Id: I088a0e896dbc26e6563291cafdfe9ceba36dd5d0
2020-12-07 15:58:56 +01:00
Gabriel Ozouf
c89a7bc496 [graph] Take margins into account for normalization
When building an orthonormal range for the automatic zoom, we provide a
ratio for the screen without the margins. This way, adding the margins
will make the graph orthonormal, and the banner cannot cover the
function.

Change-Id: If3a3f799d4e7e3e81ab77c6b418d70b734a6fbca
2020-12-07 15:58:56 +01:00
Gabriel Ozouf
a8858023ba [shared] Remove const qualifiers from interestingRanges
Change-Id: I794aa144af9dc9eab3090eea7fd54a7cdac2fd68
2020-12-07 15:58:56 +01:00