Commit Graph

11414 Commits

Author SHA1 Message Date
Émilie Feral
97ffab1fc2 build: Version 14.0.0 2020-06-04 14:58:20 +02:00
Émilie Feral
2630d0dee2 [poincare] Change approximation test to work on the device
implementation of libm (hypotf is not as accurate on the device)
2020-06-04 14:58:20 +02:00
Émilie Feral
9556ae3aa4 [poincare] Unit: comparison can rely on the pointer addresses only when
the object are ordered in a table. Otherwise, the compiler is free to
order them as it wants.

This fixes the test on the device: 10_m^2→_mm×_km simplifies to 10×_km×_mm
2020-06-04 14:58:20 +02:00
Émilie Feral
6abc3b8c99 [poincare] Enable to set POINCARE_TREE_LOG from environment variable 2020-06-04 14:58:20 +02:00
Léa Saviot
49e4abb964 [poincare/multiplication] Fix comment 2020-06-04 14:58:20 +02:00
Léa Saviot
72e342e1b1 [apps/curve_view] Fix drawArrow
Compute everything in pixels + fix glitch when zooming on the tip of
arrow(0,0,2,3)
2020-06-04 14:58:20 +02:00
Émilie Feral
2ebad3062c [apps/code] Test: strcpy isn't available on the device 2020-06-04 14:50:10 +02:00
Émilie Feral
fc238f639a [python] Fix test on matplotlib 2020-06-04 14:50:10 +02:00
Émilie Feral
4b83da21b7 [poincare] Fix Multiplication between 0 and a unreduced matrix: it
should not be equal to 0 but to Matrix(0)
2020-06-04 14:50:10 +02:00
Émilie Feral
420dd04766 [apps/shared][python/port] CurveView::drawArrow uses pixel computation
instead of float computation to avoid precision errors, by default the
arrow size is decided in pixels.
2020-06-04 14:50:10 +02:00
Léa Saviot
a9fbcf99b2 [poincare/test] Add failing test about multiplication simplification
The result should be 0*[[1,0][0,1]]^500, or, maybe later, [[0,0][0,0]]
2020-06-04 14:50:10 +02:00
Léa Saviot
0c040a7db6 [poincare/power] Fix infinite loop in reduction
Fix the broken simplification test 1/identity(2)^500
2020-06-04 14:50:10 +02:00
Léa Saviot
55ae258653 [poincare/test] Add failing matrix/power simplification test 2020-06-04 14:50:10 +02:00
Arthur Camouseigt
4b20c69174 [python/modturtle.cpp] Added support for float parameter in colormode()
The function can now accept the value 1.0 in addition to 1

Change-Id: I9a7021076844784ca997fc618253524089cbe855
(cherry picked from commit c69e1542ecc9a7e474a3f1e92cc97f644bf4b701)
2020-06-04 14:50:10 +02:00
Émilie Feral
1b2750c247 [python] matplotlib: add assertions to ensure authorized access to
args[i]
2020-06-04 14:50:10 +02:00
Arthur Camouseigt
aec25eb8d4 [matplotlib/modpyplot.cpp] Modified the error messages due to too many arguments
Change-Id: I48a8283a0c6311a52df152cbce3b0c824b46454b
(cherry picked from commit 94b90533c751c10dadb8e6144e613ed4839f09c4)
2020-06-04 14:50:10 +02:00
Arthur Camouseigt
e1a356fe88 [matplotlib/modpyplot.cpp] Added support for third parameter color in plot function
It is now possible to specify the color of the plot through a third positional argument in the plot function. However, is a keyword (color or c) is then used, it will override the previous color command.

Change-Id: I5a73ddb322e650db486de568e4a56b4752751cfb
(cherry picked from commit e6cc196cca405e5a4f8058a6af917aa0e7962b8a)
2020-06-04 14:50:10 +02:00
Arthur Camouseigt
4b88521e14 [matplotlib/modpyplot.cpp] Removing c keyword from some functions to match pyplot spec
Change-Id: I53fa8c9edc8bcfdfb9c36797b41a1c36494e2c74
(cherry picked from commit 42b245ed97d6fa3394316888489660f4f76f0a78)
2020-06-04 14:50:10 +02:00
Arthur Camouseigt
06dc97152c [matplotlib/modpyplot.cpp] Added support for keyword argument c, a shortcut for color
Change-Id: I89227a73fca6fd50ae190107fc23c3c7acadc6db
(cherry picked from commit bc642c2d8d105ed609cf8b4d86800879645afd7e)
2020-06-04 14:50:10 +02:00
Émilie Feral
7b150deaeb [apps/calculation] Hide additional outputs for Dutch exam mode 2020-06-04 14:50:10 +02:00
Émilie Feral
90fb9b4ea2 [apps/calculation] Hide calculations involving units in Dutch exam mode 2020-06-04 14:50:10 +02:00
Émilie Feral
fbeb5ed982 [apps/controller] All code regarding Dutch exam mode is in
ExamModeConfiguration
2020-06-04 14:50:10 +02:00
Léa Saviot
8412087cc8 [apps/calculaiton] Fix cursor bug
Scenario:
1 EXE MATRIX MATRIX Down Down 1 Up Up -> it crashed
2020-06-04 14:50:10 +02:00
Émilie Feral
e24de79a9e [apps/calculation] HistoryController: avoid dereferencing nullptr 2020-06-04 14:50:10 +02:00
Émilie Feral
66ba985108 [apps/code] In toolbox: plot(x,y) --> plot(x,y,color) 2020-06-04 14:50:10 +02:00
Émilie Feral
6c54fb4ebc [apps/code] Add 'write' to the toolbox (in Turtle module and catalog) 2020-06-04 14:50:10 +02:00
Émilie Feral
8ceb368047 [poincare] Adding a number before orphan unit is done at beautification
instead of at reducing (revert previous commit)

This fixes the following bug: input log(0*f(_t)) --> crash due to an
infinite loop where we remove/add 1 before the multiplication
2020-06-04 14:50:10 +02:00
Léa Saviot
163a14d9b9 [apps/exam_mode] Dutch exam mode available when language is EN/NL 2020-06-04 14:50:10 +02:00
Léa Saviot
1635f6132b [apps/code] Fix circular importation in the variable box
Scenario (crashed only on the calculator):

script1.py
from script2 import *
a=1

script2.py
from script1 import *
b=2
2020-06-04 14:50:10 +02:00
Léa Saviot
6819041c1d [apps/code] Remove TODOs 2020-06-04 14:50:10 +02:00
Léa Saviot
622cbe2e03 [apps/code] Fix auticompletion of color from Turtle
It added color(|)/color(,,) instead of just color(|)
2020-06-04 14:50:10 +02:00
Léa Saviot
e6b87be75e [apps/i18n] Fix some i18n
Did not fit or missed a space
2020-06-04 14:50:10 +02:00
Léa Saviot
02b7ed3e27 [poincare/test] Add test for commit 02a1246 2020-06-04 14:50:10 +02:00
Émilie Feral
2f4c59b881 [apps/code] VariableBoxController::addNodeIfMatches: factorize the checking
for node unicity and the insertion index computation
2020-06-04 14:50:10 +02:00
Léa Saviot
e5976984a2 [poincare/poincare] Fix typo 2020-06-04 14:50:10 +02:00
Arthur Camouseigt
d6e32594b8 [test/matplotlib.cpp][modpyplot.cpp] Changed matplotlib tests
Modified the tests for pyplot module and added error raisers to module functions

Change-Id: I164feafaf562f16d646841c1f9dfbbe32e6a763b
2020-06-04 14:50:10 +02:00
Arthur Camouseigt
68e3208799 [matplotlib/modpyplot.cpp] Removed function previously used for setting colors
Change-Id: I76bb489d5a5b78162873f68c5e3cca8cebb77aba
2020-06-04 14:50:10 +02:00
Arthur Camouseigt
c39b432dd6 [matplotlib/modpyplot.cpp] Adding keyword arguments support for plot function
plot function can now take into account the following keywords arguments :
- color

Change-Id: I29b82ba25fa68ec4d8e1797112f133440dee22a0
2020-06-04 14:50:10 +02:00
Arthur Camouseigt
b26d448573 [matplotlib/modpyplot.cpp] Adding keyword arguments support for scatter function
scatter function can now take into account the following keywords arguments :
- color

Change-Id: Iaea5a7a46d25e3efe2214368334ce859900d6ae6
2020-06-04 14:50:10 +02:00
Arthur Camouseigt
5daaa2c050 [matplotlib/modpyplot.cpp] Adding keyword arguments support for hist function
hist function can now take into account the following keyword arguments :
- color

Change-Id: I69eca6555d892db958d2bd002f438a40908b2d9d
2020-06-04 14:50:10 +02:00
Arthur Camouseigt
0e3684e137 [matplotlib/modpyplot.cpp] Adding keyword arguments support for bar function
bar function can now take into account the following keywords arguments :
- color

Change-Id: Iefa68cff59986d89c37cfecd7e3750f03c33ca59
2020-06-04 14:50:09 +02:00
Arthur Camouseigt
41da4f2bd5 [matplotlib/modpyplot] Adding keyword argument support for arrow function
Arrow function can now take into account the following keywords arguements :
- head_width
- color

Change-Id: I205dcd5776d53a4efcbf1e6da4edf29d8e399cab
2020-06-04 14:50:09 +02:00
Émilie Feral
555617aff3 [apps/code] Factorize VariableBoxController::addNode 2020-06-04 14:50:09 +02:00
Émilie Feral
705b1812f1 [apps/code] VariableBoxController: fix NodeNameCompare when nameLength >
nodeNameLength (step 2)
2020-06-04 14:50:09 +02:00
Émilie Feral
41bb169edd [apps/variable_box_controller] Auto-import: ignore variable when it is
the autocompleted one
2020-06-04 14:50:09 +02:00
Émilie Feral
d82e6de6e8 [apps/code] VariableBoxController: fix NodeNameCompare when nameLength >
nodeNameLength
2020-06-04 14:50:09 +02:00
Émilie Feral
2b53ea748d [apps/code] Typo 2020-06-04 14:50:09 +02:00
Émilie Feral
d99357fd0d [poincare] Power: don't escape normal shallowReduce for expression
containing matrix of complex form (for instance ConfidenceInterval).

This fixes the following bug: input (2_m*confidence(0.2,12))^(-1) -->
crashes
2020-06-04 14:50:09 +02:00
Émilie Feral
ade90db392 [poincare] UnitConvert: implement removeUnit since UnitConvert can be a
reduced expression
2020-06-04 14:50:09 +02:00
Émilie Feral
b3994127c2 [poincare] Remove false assertion (splitIntoNormalForm can be called by
denominator() at reduction - there is no reason that there is no unit at
this stage...)
2020-06-04 14:50:09 +02:00