Commit Graph

1713 Commits

Author SHA1 Message Date
0b101
0a07a82a96 Added Compact Result Display 2020-02-16 12:47:29 -06:00
Quentin Guidée
ab8f731515 Fixed some conflicts 2020-02-12 17:42:58 +01:00
Léa Saviot
4d8099e273 [poincare/matrix] shallowReduce checks there are no unit children 2020-02-12 15:13:26 +01:00
Ruben Dashyan
9526d1d591 [poincare/unit] Lighten Dimension constructor 2020-02-12 15:13:26 +01:00
Ruben Dashyan
1e3b8581e5 [poincare/unit] Lighten Representative constructor 2020-02-12 15:13:26 +01:00
Émilie Feral
a211b6efb6 [poincare] Change unit name: hour -> h 2020-02-12 15:13:25 +01:00
Ruben Dashyan
e39ad9d923 [poincare/expression_node] Fix ExpresssionNode::Type ordering
A Multiplication whose children are all real or ComplexCartesian are
multiplied to form a single ComplexCartesian. That step of shallowReduce
assumed that the last child is a ComplexCartesian. Since a Unit is now
considered as real, the previous assumption can be maintained be
reordering the ExpresssionNode::Type.
2020-02-12 15:13:25 +01:00
Léa Saviot
94d71634b6 [poincare/unit_convert] In shallowReduce, fix units testing on the right
First reduce the right member by replacing the units to make sure there
is a unit, then reduce without replacing to keep "complex units" such as
L, N, ...
2020-02-12 15:13:25 +01:00
Ruben Dashyan
cc280373d0 [poincare] Reducing an Expression which hasUnit in its children returns Undefined in general 2020-02-12 15:13:25 +01:00
Léa Saviot
d5b07f1f90 [poincare] Implemment getUnit 2020-02-12 15:13:25 +01:00
Léa Saviot
94334169f0 [poincare/expr] Remove beautifiedExpHasUnits and reducedExpIsUnitsOnly 2020-02-12 15:13:25 +01:00
Léa Saviot
ecdcb100fb [poincare/unit_convert] Fix UnitConvert::shallowReduce 2020-02-12 15:13:25 +01:00
Émilie Feral
3df80ed780 [poincare] ParameteredExpression: overrides getVariables to avoid
considering parameter as a variable
2020-02-12 15:13:25 +01:00
Léa Saviot
5afb49c85d [poincare] Rename RightArrow -> RightwardsArrow 2020-02-12 15:13:24 +01:00
Léa Saviot
7a65e5180b [poincare/right_arrow_expression] Factorize Store and UnivtConvert 2020-02-12 15:13:24 +01:00
Léa Saviot
c543985094 [poincare] Unit conversion 2020-02-12 15:13:24 +01:00
Léa Saviot
4b996b333b [poincare/empty_context] Add missing file 2020-02-12 15:13:24 +01:00
Léa Saviot
9102ba1381 [poincare/function] Fix shallowReduce to take into account symbComp 2020-02-12 15:13:24 +01:00
Léa Saviot
424ee9fa15 [poincare] Add SymbolicComputation parameter to the reduction context
This way, in solver, we can reduce expression without expanding symbols
2020-02-12 15:13:24 +01:00
Léa Saviot
db0e7f0d8b [apps/solver] Display user variables in the solutions 2020-02-12 15:13:23 +01:00
Léa Saviot
0e64e89496 [apps/solver] Do not use symbol context if no solution found
Still replace the functions
2020-02-12 15:13:23 +01:00
Ruben Dashyan
7964a2ae6a [poincare/unit][kandinsky/font] Use Greek capital letter omega as Ohm unit symbol 2020-02-12 15:13:23 +01:00
Ruben Dashyan
3308427dd4 [poincare/unit] Fix micro prefix symbol 2020-02-12 15:13:23 +01:00
Émilie Feral
ed035ec3f7 [poincare] Unit: h --> hour 2020-02-12 15:13:23 +01:00
Émilie Feral
22bbe932c8 [poincare] Unit: no prefix for tonne unit 2020-02-12 15:13:23 +01:00
Ruben Dashyan
15a9137d14 [poincare/unit] Remove angstrom unit 2020-02-12 15:13:23 +01:00
Ruben Dashyan
6da74ea3e1 [poincare/unit] Add prefixes for liter 2020-02-12 15:13:23 +01:00
Ruben Dashyan
c66ef8212a [poincare/unit] Do not output units with short-scale prefixes 2020-02-12 15:13:23 +01:00
Ruben Dashyan
ab836c7a01 [poincare/unit] Distinguish prefixability of units at input and output 2020-02-12 15:13:23 +01:00
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