Commit Graph

1664 Commits

Author SHA1 Message Date
Ruben Dashyan
8f31f56544 [poincare/unit] Fix pressure units 2020-02-12 15:13:23 +01:00
Émilie Feral
551e4998f4 [apps/calculation][apps/solver][poincare] Simplify sign =/≈ computation
between outputs in Calculation/Solver
2020-02-12 15:13:23 +01:00
Ruben Dashyan
b3f4dcb13d [poincare/unit] Fix electron-volt unit definition 2020-02-12 15:13:23 +01:00
Ruben Dashyan
a9ca60338c [poincare] Beautify Unit products according to value's order of magnitude 2020-02-12 15:13:23 +01:00
Ruben Dashyan
380e6fff3d [poincare/unit] Improve Tree log 2020-02-12 15:13:23 +01:00
Émilie Feral
489901a613 [poincare] Units are now prefixed by "_" to distinct them from user
variable
2020-02-12 15:13:22 +01:00
Émilie Feral
313430ec97 [poincare] Expression: add comment for future improvement 2020-02-12 15:13:22 +01:00
Émilie Feral
bf73b69808 [poincare] Units: change signature of serialize to follow same
conventions as Expression::serialize
2020-02-12 15:13:22 +01:00
Ruben Dashyan
eba529d5ee [poincare/multiplication] Optimize shallowBeautify for units: do not use deepReduce repeatedly 2020-02-12 15:13:22 +01:00
Ruben Dashyan
454bfc4f36 [poincare/multiplication] Units always stay in the numerator 2020-02-12 15:13:22 +01:00
Ruben Dashyan
92d17145b2 [poincare] Define Unit class 2020-02-12 15:13:22 +01:00
Émilie Feral
60048cb9a9 [poincare] Create a ContextWithParent that implements expressionTypeForIdentifier 2020-02-12 15:13:22 +01:00
Émilie Feral
4e948ce533 [poincare] Change Factor approximation to return undef on non real
values
2020-02-12 15:13:22 +01:00
Léa Saviot
9d6bab092f [poincare/parser] Identifier is not already function -> symbol
We check the context: if an identifier is already a function, we
interpret it as such, otherwise it is a symbol.
This way, in the Equation app, x(x+1) is interpreted as x*(x+1)
2020-02-12 15:13:21 +01:00
Léa Saviot
756eeeb2d8 [poincare/parser] Add context 2020-02-12 15:13:21 +01:00
Émilie Feral
398b529811 [apps/calculation][poincare] AdditionalInformationType is determined
from both input and output expressions of a Calculation
2020-02-12 15:13:21 +01:00
Émilie Feral
f6dcc35bce [poincare] Standardize the convention of 'deepReplaceReplaceableSymbols'
and 'ExpressionWithoutSymbols': they return an uninitialized expression
when the expression is circularly defined
2020-02-12 15:13:21 +01:00
Émilie Feral
72d1370cff [poincare] Returns a RealUndefined evaluation for Expression that are
always real.
This avoids that floor(i) is simplified to (undef, 0) but approximates
to (undef, undef)
2020-02-12 15:13:21 +01:00
Léa Saviot
55a4e3d94c [apps/proba] Implement Fisher formulae 2020-02-12 15:13:21 +01:00
Émilie Feral
e324c1af10 [poincare] AdditionalInformationType: integer above 1E16 don't have
additioncal informations
2020-02-12 15:13:20 +01:00
Émilie Feral
df6817547f [poincare] Integer: create 2 methods 'CreateMixedFraction' and
'CreateEuclideanDivision' that build expected expressions from 2
integers
2020-02-12 15:13:19 +01:00
Émilie Feral
6af04edf32 [poincare] Expression::additionalInformationType: return Rational for
all forms of type [±12]/[±32]
2020-02-12 15:13:19 +01:00
Émilie Feral
ae438ca546 [poincare] DivisionQuotient, DivisionRemainder: add method to reduce on
Integers
2020-02-12 15:13:19 +01:00
Émilie Feral
de2046fea8 [poincare] BasedInteger: fix multiplication sign with Decimal integer 2020-02-12 15:13:19 +01:00
Émilie Feral
00e8af789b [poincare] BasedInteger: use dot mutliplication sign around
binary/hexadecimal integers
2020-02-12 15:13:19 +01:00
Émilie Feral
30c4e01737 [poincare] Fix and add tests about BasedInteger 2020-02-12 15:13:19 +01:00
Émilie Feral
aabe663376 [poincare] Number: "12242" is parsed as a BasedInteger instead of a
Rational
2020-02-12 15:13:19 +01:00
Émilie Feral
ce85fa2185 [poincare] BasedInteger: fix multiplication sign between 0x23A and π 2020-02-12 15:13:19 +01:00
Émilie Feral
e72ba3d064 [poincare] Number: fix number to handle BasedInteger case 2020-02-12 15:13:19 +01:00
Émilie Feral
7c2ef5847b [poincare] Add class BasedInteger 2020-02-12 15:13:19 +01:00
Émilie Feral
fef07ee239 [poincare] Integer: add methods to serialize/layout/build in hexadecimal and binary 2020-02-12 15:13:19 +01:00
Émilie Feral
a21689d72c [apps/calculation][poincare] Move additionalInformationType method from
Calculation to Poincare module
2020-02-12 15:13:18 +01:00
Émilie Feral
66b88de4b4 [apps/calculation] WIP: Improve Calculation::additionalOuput 2020-02-12 15:13:18 +01:00
Émilie Feral
fa5902dcd2 [apps/calculation] Calculation: add a methods additionalOuput 2020-02-12 15:13:18 +01:00
Léa Saviot
c192d2c920 [poincare/serialization_helper] Better ReplaceSysPrthesesByUsrPrtheses 2020-02-12 15:13:18 +01:00
Léa Saviot
8f86769cd1 [escher/layout_field] When pasting, force cursor right of pasted text
Even if the text is inserted code point per code point
2020-02-12 15:13:18 +01:00
Léa Saviot
2c1cc02a19 [escher/layout_field] Fix selection + matrices
When selecting inside a matrix and then selecting outside, the grey
squares should disappear.
2020-02-12 15:13:18 +01:00
Léa Saviot
7d2a24b826 [poincare/tree_pool] Fix node fetching after pool exception 2020-02-12 15:13:18 +01:00
Léa Saviot
b1aeda47e8 [poincare/layout] Add parameter for selection when moving cursor 2020-02-12 15:13:17 +01:00
Léa Saviot
51742aef40 [escher/layout_cursor] Set height to the selection height
4
For instance, 123+- with "123+" selected, the cursor on the left of the
                  5
fraction will have the height of the selection.
2020-02-12 15:13:17 +01:00
Léa Saviot
c29ab14f20 [escher/layout_field] Better handling of layout recomputation
After a selection event, there is no need to recompute the layout. We
still need to dirty the union of the previous and next selection
rectangles.
2020-02-12 15:13:17 +01:00
Léa Saviot
a92326f9c9 [poincare/layout_cursor] Rename MoveDirection -> Direction 2020-02-12 15:13:17 +01:00
Léa Saviot
97c9268d37 [poincare/horizontal_layout] Uniformize selection background height 2020-02-12 15:13:17 +01:00
Léa Saviot
9ff3cbf32d [escher/expression_view] Layout selection color 2020-02-12 15:13:17 +01:00
Léa Saviot
785cd2f88c [poincare/layout_cursor] Rename layoutReference -> layout
It was an historic name
2020-02-12 15:13:17 +01:00
Léa Saviot
5c2ea9899d [poincare/layout_field] Select up/down 2020-02-12 15:13:17 +01:00
Léa Saviot
5de65e0d7e [escher/layout_field] Copy selection 2020-02-12 15:13:17 +01:00
Léa Saviot
a959f9fa98 [poincare/lyt_cursor] When selecting, we add one full layout each time 2020-02-12 15:13:17 +01:00
Léa Saviot
377cca7e3d [escher/layout_field] Start handling selection 2020-02-12 15:13:17 +01:00
Ruben Dashyan
e984277d66 [poincare/multiplication] shallowBeautify and denominator call new splitIntoNormalForm 2020-02-12 15:13:16 +01:00