Commit Graph

8977 Commits

Author SHA1 Message Date
Émilie Feral
0e40177f85 [poincare] Product, Sum, Integral, Floor etc (special layouts) serialize
to identifier[arg1, arg2, ...] instead of identifier([arg1, arg2, ...])
which is not parseable
2019-08-08 17:22:03 +02:00
Émilie Feral
4bffb13829 [poincare] MultiplicationImplicite: we can avoid adding system
parentheses around Power, Factorial and Multiplication. Precedence rules
will group together Factorial/Power before Multiplication (even
implicite multiplication)
2019-08-08 17:22:03 +02:00
Léa Saviot
f5e11b7d74 [apps/calculation] Exception checkpoint around secondary method
When computing [[2,3,2][ln(2),1,5][1,8,9]] there was a memory pool
failure because of the computation of
exactAndApproximateDisplayedOutputsAreEqual. Because displaying the
right equal symbol is less important than displaying a result, we
encapsulate the method in an exception checkpoint: if there was not
enough memory on the pool to compute the equal sign, just return
EqualSign::Approximation.
2019-08-08 17:22:03 +02:00
Léa Saviot
b4f6e37399 [apps/calcualtion] Optimize pool use 2019-08-08 17:22:03 +02:00
Léa Saviot
9380fafe9d [apps/calculation] Fix coding typo 2019-08-08 17:22:03 +02:00
Léa Saviot
3f6d08dd35 [apps/calc] Use memmove that is safer than memcpy
There was a wrong memcpy used in the memoization buffer sliding
2019-08-08 17:22:03 +02:00
Léa Saviot
05678b48f6 [apps/calc] Remove whole calculation memoization in HistoryViewCell
It is no longer compatible with the new calculations as they no longer
have a constant size.
2019-08-08 17:22:03 +02:00
Léa Saviot
f43e73333a [apps/calculation] Put back memoization 2019-08-08 17:22:02 +02:00
Léa Saviot
c3ee31f80e [apps/calculation] Fix HistoryController/Store index 2019-08-08 17:22:02 +02:00
Léa Saviot
63f20a9844 [apps/function_store] Comment coding style 2019-08-08 17:22:02 +02:00
Léa Saviot
1af882ddae [apps/calculation] Fix calculation history index 2019-08-08 17:22:02 +02:00
Léa Saviot
0f12d226ae [apps/calculation] Put expression in scope
To reduce the number of expressions at a givent time on the pool
2019-08-08 17:22:02 +02:00
Léa Saviot
c7fd11e4b0 [apps/calculation] Calculation store has one big buffer for calculations 2019-08-08 17:22:02 +02:00
Léa Saviot
e15df6d60d [apps] Removed unneeded paramater in ExpiringPointer 2019-08-08 17:22:02 +02:00
Émilie Feral
d0fb30028e [poincare] Use '×' instead of '·' when pressing multiplication key 2019-08-08 17:22:02 +02:00
Émilie Feral
0d9629e226 [poincare] Omit multiplication when possible at beautifying 2019-08-08 17:22:02 +02:00
Émilie Feral
4dd445a60b [poincare] When beautifying, add missing user parentheses once both
parent and child have been beautified (otherwise, the child might change
and in a new expression that requires parentheses)
2019-08-08 17:22:02 +02:00
Émilie Feral
d985872951 [poincare] Rational: make a method 'isInteger' 2019-08-08 17:22:02 +02:00
Émilie Feral
c08d7a4733 [poincare] Add Parentheses around conjugate expression to easen reading:
conj(2+i)*2 --> (conj(2+i))*2
2019-08-08 17:22:02 +02:00
Émilie Feral
5900dcae0e [poincare] Clean the use of System parentheses from normal parentheses:
System parentheses are used when serializing a tree to keep the
structure information in the serialization. For example, we serialize
 2+1
----- to [2+3]/3
  3

User parentheses can be added after parsing or when beautifying a
reduced expression to make a mathematically correct expression or more
conventionnal expression. For example, parsing "1+-2" will give
Addition(One, Opposite(2)) that we will transform into Addition(One,
Parenthesis(Opposite(2))) (1+-2 --> 1+(-2)).
2019-08-08 17:22:02 +02:00
Émilie Feral
2ecc566c2c [escher] TextField: when handling event with text, replace system
parenthesis by user parenthesis to switch from layout structure to
linear text.

When copying a layout and pasting it to a textfield, we add required
parentheses:

 2+1
----- serializes to ---> [2+1]/3 and is turned to (2+1)/3 before being
  3
handled by a textfield.
2019-08-08 17:22:02 +02:00
Émilie Feral
f13dd5f9be [poincare] Only some layouts are serialized with System Parentheses
wrapping their children (absoluteValueLayout, CeilingLayout...)
2019-08-08 17:22:02 +02:00
Émilie Feral
b11e6e5661 [poincare] System parentheses are not layouted but used only to
correctly serialized fraction layouts, integral layouts...

Layouts wrapped by system parentheses:
- fraction children
- fraction (to be able to omit multiplication)
- vertical offset index
- integral children
- sequence chidlren
2019-08-08 17:22:02 +02:00
Émilie Feral
f3b332071b [poincare] layout_helper: enable to call Infix with empty operator name 2019-08-08 17:22:02 +02:00
Émilie Feral
df72f44744 .gitignore: add all pyc generated files 2019-08-08 17:22:02 +02:00
Émilie Feral
fd25b678ce [poincare] Split Multiplication into MultiplicationExplicite and
MultiplicationImplicite
2019-08-08 17:22:02 +02:00
Émilie Feral
00d86adf3d [apps/sequence] Add tests on third sequence 2019-08-08 17:22:02 +02:00
Émilie Feral
bcac947b05 [apps/sequence] defaultCursorAbscissa is forced positive 2019-08-08 17:22:01 +02:00
Émilie Feral
4abd68a4b8 [power] Nth root of -1 return the principal angle 2019-08-08 17:22:01 +02:00
Émilie Feral
869ab35c54 Makefile: build only necessary files for test target 2019-08-08 17:22:01 +02:00
Émilie Feral
ae750cce28 [poincare] Symbol: createLayout is special for sequence symbols. We add w(n) and w(n+1) to all other sequence symbols. 2019-08-08 17:22:01 +02:00
Émilie Feral
4c4d420b1f [app/sequence] Fix Sequence toolbox with the third sequence 2019-08-08 17:22:01 +02:00
Émilie Feral
2e7fb601c8 [app/sequence] Add a third sequence 2019-08-08 17:22:01 +02:00
Émilie Feral
7db5a10da9 [poincare] Symbol: enable to construct empty symbol 2019-08-08 17:22:01 +02:00
Émilie Feral
d1f8c42ee6 [poincare] Parser: w is a symbol reserved for sequence 2019-08-08 17:22:01 +02:00
Émilie Feral
9b130a8e41 [scripts] N0110: create target %_flash 2019-08-08 17:22:01 +02:00
Émilie Feral
d01a3794e8 [scripts] device/dfu.py: enable to jump to another address than
0x08000000 when leaving DFU mode
2019-08-08 17:22:01 +02:00
Émilie Feral
e1a863cdf6 [scripts] Fix epsilon_flash target for n0100 (get rid of dfu-utils
dependency)
2019-08-08 17:22:01 +02:00
Émilie Feral
9a25462e3e [scripts] device/dfu.py: fix exitDfu 2019-08-08 17:22:01 +02:00
Émilie Feral
33d39153b2 [scripts] device/dfu.py: extend the detected dfu devices (include
NumWorks VID/PID)
2019-08-08 17:22:01 +02:00
Émilie Feral
5a14037b9c [scripts] Package dfu-util equivalent in python (sources from micropython) 2019-08-08 17:22:01 +02:00
Émilie Feral
42ba0c2a16 [ion] Fix Makefile bug due to including non-existing flag 2019-08-08 17:22:01 +02:00
Émilie Feral
870c8cb6ab Makefile: improve make info to display all potential building flags and
targets
2019-08-08 17:22:01 +02:00
Émilie Feral
3f944a2ebe [scripts] config.mak: remove remaining EPSILON_BOOT_PROMPT flags 2019-08-08 17:22:01 +02:00
Émilie Feral
69a46c2aca [ion] sdl: remove duplicate definition of waitForVBlank 2019-08-08 17:22:01 +02:00
Émilie Feral
87b54385aa [scripts] Enable to call "make PLATFORM=blackbox compare" without
precising the building directory
2019-08-08 17:22:01 +02:00
Émilie Feral
b439e1fc1e Makefile: make a target workshop_python_emulator 2019-08-08 17:22:01 +02:00
Émilie Feral
a8a5912319 [scripts] Enable to call "makefile PLATFORM=emscripten simulator.zip"
without precising the building directory
2019-08-08 17:22:01 +02:00
Émilie Feral
7837e6be4a Makefile: create a PHONY target clean_for_apps_selection which only clean
the files that need to be cleaned before changing the EPSILON_APPS flag
2019-08-08 17:22:01 +02:00
Émilie Feral
1b7def19c2 [scripts] Build in release and debug objects in separated subfolders:
(eg, build/[release|debug]/[device|emscripten|...]/)
2019-08-08 17:22:01 +02:00