Gabriel Ozouf
f09f06d7ac
[poincare/logarithm] Update tests
2020-12-02 16:49:09 +01:00
Gabriel Ozouf
9775953142
[poincare/logarithm] ln(0) = undef
...
As a consequence, log(x,0) = ln(x)/ln(0) = undef
2020-12-02 16:49:09 +01:00
Gabriel Ozouf
2ba1941270
[poincare/zoom] Float litterals
...
Change-Id: Ifea5f356b9cee271c43b3d9b9168fd38db78d87a
2020-11-26 17:51:40 +01:00
Gabriel Ozouf
ddfde60982
[poincare/zoom] Update tests for the device
...
Change-Id: Ied73829ff294dc243ca177c5c2acfb374a7446b9
2020-11-26 17:51:40 +01:00
Gabriel Ozouf
746a781016
[poincare/zoom] Fix coding style
...
Change-Id: I263e1a95023f650376bf6a1c4bb45426d52d5e4c
2020-11-26 17:51:40 +01:00
Gabriel Ozouf
fdcccde996
[poincare/zoom] Update unit tests
...
Change-Id: Ic108bfbacd54d43ef6c721589ada813ca648e88e
2020-11-26 17:51:40 +01:00
Gabriel Ozouf
4869383263
[poincare/zoom] Better handling of single points of interest
...
Functions with a single point of inerest used to be drawn on a tiny
interval around this point.
Now, an orthonormal window is built around the point of interest, giving
a much nicer view.
Change-Id: I7793797aead2695532ddea44d93d62bb7ef870f4
2020-11-26 17:51:40 +01:00
Gabriel Ozouf
229865aff8
[poincare/zoom] Rework unit tests
...
Change-Id: Id0ff36517d14710701f6a4c1cec8817442b6f946
2020-11-26 17:51:40 +01:00
Gabriel Ozouf
291b400595
[poincare/zoom] Ignore imprecise float value
...
When looking for extrema in a function, we need to discard results where
the function growth rate is smaller than the precision of the float type
itself : these results are likely to be too noisy, and can cause false
positives.
e.g. : The sqrt(x^2+1)-x function
Change-Id: I6e2c002d7308b41a4c226d274cbb5d9efe4ea7db
2020-11-26 17:51:40 +01:00
Gabriel Ozouf
adf28345b1
[poincare/zoom] Reduce zoom artifact
...
Do not use the bounds of the interval when computing a refined range.
As the bounds are often integers, the zoom would give strange result on
some non-continuous functions (e.g. f(x) = x!).
Change-Id: Ie127fe15191cb3951cff223adc8dc3172188c789
2020-11-26 17:51:40 +01:00
Gabriel Ozouf
a418602763
[poincare/zoom] Remember points of interest when refining
...
Change-Id: I229cbffa2577d23bfa0a4c0632bc9ec32ae338e7
2020-11-26 17:51:40 +01:00
Gabriel Ozouf
ca9cb63909
[poincare/zoom] Reduce the step for searching points of interest
...
The algorithm to search for points of interest will miss some. We reduce
the step to make it more precise, so that tan(x) and tan(x-90) have the
same profile.
Change-Id: Ia1bac1d4e7b98d2d6f36f8ce12ed9dac67d40198
2020-11-26 17:51:40 +01:00
Gabriel Ozouf
540209f1a9
[poincare/zoom] Preserve standard bound when normalizing
...
Change-Id: I6d736e945eda6982ad26836763feded8a55134a0
2020-11-26 17:51:40 +01:00
Gabriel Ozouf
e4162976e4
[poincare/zoom] Method NextUnit
...
Change-Id: I8200c38fd44b662dcffa8e9850fc272f3e2dc7e8
2020-11-26 17:51:40 +01:00
Hugo Saint-Vignes
3ac3fba468
[poincare] Prevent system parenthesis text insertion
...
Change-Id: I5963d2fda37ed9776059b29edced75f88b4ccb2b
2020-11-20 13:33:00 +01:00
Hugo Saint-Vignes
d8527b02ad
[poincare] Add a vector type for matrix product and norm operations
...
Change-Id: I28b0956273f8c0a3a9bdc4389956caa106d6b8af
2020-11-19 11:41:29 +01:00
Hugo Saint-Vignes
522456677a
[poincare] Add an Array class to factorize Matrix and Grid methods
...
Change-Id: Ia61caf0bf182c1111119740d43d957f203c0975c
2020-11-19 11:41:29 +01:00
Hugo Saint-Vignes
c0413709b7
[poincare] Require same vector orientation for dot and cross products
...
Change-Id: I4cf248cf564899314a1efb1c5e39a041395ba583
2020-11-19 11:41:29 +01:00
Hugo Saint-Vignes
cb54e22272
[poincare/test] Add tests on horizontal vectors
...
Change-Id: If2d6293ede044ffe71e632212eff155b80ad683f
2020-11-19 11:41:29 +01:00
Hugo Saint-Vignes
bee8d8531b
[poincare] Handle horizontal vectors
...
Change-Id: I98088b2b9f2dbc0549795a5c3eed4787fea70068
2020-11-19 11:41:29 +01:00
Gabriel Ozouf
0c44deb35f
[poincare/matrix_layout] Change comparison order
...
Change-Id: Iaa048d82005a7dfa380357e80bbac447c0976e55
2020-11-17 11:42:55 +01:00
Gabriel Ozouf
323e72a50c
[poincare/matrix_layout] Remove columns with backspace
...
Allow removing empty columns with backspace, the same way one can remove
empty rows. This allows deleting the internal columns that are not
automatically deleted.
Change-Id: I52def7939257942a8396721d01c4d1531ef90361
2020-11-17 11:42:55 +01:00
Gabriel Ozouf
7184202a6e
[poincare/matrix_layout] Keep median rows and columns
...
Empty columns and rows are only removed automatically when they are the
last row/column. This way, the user can edit a median row/column without
the matrix collapsing.
Change-Id: If611fa0133f270d785809d433ae879879b6b093f
2020-11-17 11:42:55 +01:00
Gabriel Ozouf
62e2a71da1
[poincare/matrix_layout] Remove empty rows
...
Empty columns are automatically removed ; the same is now done to empty
rows.
Change-Id: Ib66dfe83f1ea712d3f9a450eedd7ade709296413
2020-11-17 11:42:55 +01:00
Hugo Saint-Vignes
04b2683af2
[poincare] Replaced an escape case with an assert only
...
Change-Id: I5ea501beeb42577a25dd752f8b9492210abd38fc
2020-11-16 17:12:42 +01:00
Hugo Saint-Vignes
73b5b0775a
[poincare] Avoid nullptr context on non-Numbers sign and nullStatus methods
...
Change-Id: I3361344c1e0b50cdbe999d6ea50025022a51f603
2020-11-16 17:12:42 +01:00
Hugo Saint-Vignes
a0497d3bd7
[poincare] Prevent Bad access on abstract symbol context
...
Change-Id: I3077db5fdc2430ee11ceb1c6eb651e4331fb2ba0
2020-11-16 17:12:42 +01:00
Léa Saviot
4df996cfd2
[poincare/expression_node] TODO: use ReductionContext via pointers
2020-11-09 15:50:27 +01:00
Léa Saviot
5df60e946a
[poincare] shallowBeautify can modify the reduction context
...
UnitConvert must set UnitConversion to None, otherwise the unit asked
for in the conversion might get changed after being properly set in
UnitConvert::shallowBeautify.
2020-11-09 15:50:27 +01:00
Léa Saviot
3a0796d3c5
[poincare/test] Add tests about negtive unit convert simplification
2020-11-09 15:50:27 +01:00
Émilie Feral
d789e8da97
[poincare] In Multiplication::shallowBeautify, when extracting the unit,
...
reduce without changing the unit in order to extract the right unit.
This fixes the following bug: simplify "πππ23*_cK"
2020-11-06 14:51:49 +01:00
Émilie Feral
50bc31fcfa
[poincare] Test: add a simplification test regarding unit
2020-11-06 14:51:49 +01:00
Émilie Feral
5afdec00b8
[poincare] Avoid reading "garbage" value: result variable can be
...
read in the while condition without being set to an initial value
(if the first ridderApproximation was undefined for instance)
Found by clang-analyzer
2020-11-05 10:28:24 +01:00
Émilie Feral
c7711b74c2
[poincare] Sequence: reorder condition (optimization)
2020-11-04 15:58:43 +01:00
Émilie Feral
4cc3542a99
[poincare] Sequence: when approximating within a reduce routine, escape to avoid
...
infinite loop
2020-11-04 15:58:41 +01:00
Émilie Feral
7142f9545e
[poincare] Finish replacing approximateContext
2020-11-04 15:58:41 +01:00
Léa Saviot
f8b3156f19
[poincare] Start replacing approximateContext
2020-11-04 15:58:41 +01:00
Léa Saviot
644cf4dcf3
[poincare] Step II: create ApproximateContext
2020-11-04 15:58:40 +01:00
Émilie Feral
75dc415e27
[poincare] Step I: add a parameter to approximation routines to indicate
...
if we're within a reduction routine
2020-11-04 15:58:40 +01:00
Hugo Saint-Vignes
42f20fb58d
[poincare] Add NullStatus and sign for more complex expressions
...
Change-Id: Ic593517bf7a983985fe3c521e10c19ab0bca4191
2020-11-04 15:58:34 +01:00
Hugo Saint-Vignes
61d33be2a7
[poincare] Add NullStatus and sign for more expressions
...
Change-Id: I4443a28532f5b728afe169a3d2a70d9026bc1909
2020-11-04 15:58:34 +01:00
Hugo Saint-Vignes
4a3f749cc6
[poincare] Add NullStatus for expressions
...
Change-Id: Ibaba72e3e3589ba259c7b22d402e2b27937f27c1
2020-11-04 15:58:34 +01:00
Hugo Saint-Vignes
b2945c3f8b
[poincare] Add isNumberZero tests
...
Change-Id: Ia8906e27c5c28f96c87ed39f522f4b1028ad80b8
2020-11-04 15:58:33 +01:00
Hugo Saint-Vignes
98499f6c9f
[poincare] Rename isRationalZero to isNumberZero
...
Change-Id: I554dd5e9b9ab3af4364ca23cde590f9e0a458ef8
2020-11-04 15:58:33 +01:00
Hugo Saint-Vignes
58114255e5
[poincare] implement isRationalZero for other numbers
...
Change-Id: I40f61958f9e51adb376407b2a512097962979417
2020-11-04 15:58:33 +01:00
Hugo Saint-Vignes
9d077c672d
[poincare/test] Add tests for multiplication reduction
...
Change-Id: I54186c0a7c12f7fb0122c0a67f4a6d0d462feb82
2020-11-04 15:58:32 +01:00
Hugo Saint-Vignes
0d883bfb19
[poincare] Handle division by 0 when combining powers
...
Change-Id: I108ba8131ef2f8d3d210a769322a815121311f6b
2020-11-04 15:58:32 +01:00
Hugo Saint-Vignes
aba09e1a1f
[poincare] Fix multiplication.cpp comment typos
...
Change-Id: I1553144fb45f45cbdb4e021b14ef20cb319984cc
2020-11-04 15:58:32 +01:00
Gabriel Ozouf
65156c8e5a
[poincare/zoom] Add test for x*ln(x)
...
Change-Id: Ia28a7ffb826a9b6e3618b222b6ed9d0d43de308a
2020-11-04 15:58:28 +01:00
Hugo Saint-Vignes
93b5a3f63a
[poincare] Handle equal negative numbers in GCD LCM
...
Change-Id: Ia46966270418a339f8a37e8a1971a7f7dd046034
2020-11-04 15:58:28 +01:00