Laury
25d4793441
[poincare] Fixed tests
2022-06-25 23:35:38 +02:00
Laury
4893b73917
[test] Fixed tests compilation
2022-06-25 19:46:00 +02:00
Laury
e8ea693e5c
[calculation] Dimension in additional output for values with units
2022-06-18 22:36:55 +02:00
Yaya-Cout
169fb7404e
Fix spelling ( #128 )
...
* Fix spelling in .cpp files
* Fix spelling in all files
2022-01-20 17:21:35 +01:00
Gabriel Ozouf
f6c91f7dbe
[poincare/function] Add tests on getVariables
2020-12-29 17:20:09 +01:00
Gabriel Ozouf
48d93584e7
[poincare/parametered_expression] Fix variables detection
...
The method getVariables would not correctly remove the parameter from
the list of variables.
e.g. In the expression "box+y×int(z,x,0,1)", when trying to remove x
from the list of variables, the letter x would be removed from the name
"box" instead.
2020-12-29 13:34:09 +01:00
Hugo Saint-Vignes
e09bd0a18c
[poincare] Factorize reduce and removeUnit methods
2020-12-22 17:32: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
Gabriel Ozouf
bc7ca057a0
[apps/calculation] Add Joules to results on energy
...
Change-Id: Ib775b1bd2bac1fd3bf755a9a4d3d5b3739a67cfa
2020-11-04 15:33:02 +01:00
Gabriel Ozouf
3f19d66c78
[poincare/unit] Change temperature symbols
...
Celsius and Fahrenheit now use the degree symbol °.
_Cel -> _°C
_Fah -> _°F
Change-Id: Ic5935d3a6263a556692bebb6254b6b6d4de48431
2020-11-04 15:33:00 +01:00
Gabriel Ozouf
d37540f032
[poincare/unit] Add Celsius and Fahrenheit
...
Temperatures can be converted to and from degree Celsius and Fahrenheit.
When used in non-trivial calculations, they are always reduced to undef,
as the rules for manipulating relative scales are not well defined.
Change-Id: If59e224a0e7f940b421bc894bbe2279c90f38d04
2020-11-04 15:33:00 +01:00
Gabriel Ozouf
0ed0cc56e9
[poincare] Remove characteristicXHalfRange
...
Method characteristicXHalfRange was used to compute the range on which
to display cartesian function in Graph. With the new zoom algorithm,
this method is deprecated.
Change-Id: Ic681fab8d58d0f5628a94302a7b49dacaaa1a6a3
2020-11-04 15:30:53 +01:00
Gabriel Ozouf
860ce558c2
[poincare/unit] Remove some additional results
...
Imperial additional results now only appear when the selected unit
system is Imperial.
Change-Id: Icc314d0148810bea67e4d729179393f1fceaf214
2020-11-04 15:11:45 +01:00
Gabriel Ozouf
801c61549c
[poincare/unit] Change units for volume split
...
In additional outputs, a volume is now splitted as :
_gal+_qt+_pt+_cup
instead of :
_gal+_cup+_floz
Change-Id: I5020afbab23be6331d8a8742fd6295db178f0b37
2020-11-04 15:11:45 +01:00
Gabriel Ozouf
5e06f62ff6
[poincare/unit] Symbols for cup and tablespoon
...
_cp -> _cup
_Tbsp -> _tbsp
Change-Id: Ied3e1624edc980f76c2f775cbb9e6028db8a83c5
2020-11-04 15:11:45 +01:00
Gabriel Ozouf
52dcd8e749
[poincare/unit] Restructure Unit
...
1. Information about a unit's dimension now uses inheritance.
_m is an instance of DistanceAlias, which is derived from Alias.
A UnitNode now keeps a pointer to an Alias and one to a Prefix.
All aliases are still defined as constexpr.
This cleans up a lot of the code used namely for computing the
additional outputs in Calculation.
2. Instead of being defined with a string, each unit is described by its
ratio with the base SI unit (ex: _L is 0.001 instead of "0.001_m^3").
This greatly speeds up the calculations using units, as the algorithm
to find the best unit used to parse the definition.
Change-Id: I4d6ed6ad4cb967026a3f01a335aec270066e2b9f
2020-11-04 15:11:45 +01:00
Gabriel Ozouf
fad375c11c
[poincare] Add unitFormat to ReductionContext
...
Change-Id: I1d3fcd2f47c973c041e1be84e9a902dd58de3562
2020-11-04 15:11:44 +01:00
Hugo Saint-Vignes
8d2af7e77f
[poincare/test] Add VectorOperation tests, tidy rref tests
...
Change-Id: I4072bee6b2d3bf1ad17045149bff8dcdb6a2f238
2020-11-04 15:11:43 +01:00
Hugo Saint-Vignes
007c38652f
[poincare] Add ref and rref matrix functions
...
Change-Id: Id0e57a4f85d551ca5320c4b6e3c0baadae70946d
2020-11-04 15:07:20 +01:00
Gabriel Ozouf
6f378ef3ef
[poincare] Implemented didDerivate for Multiplication
...
Derivation propagates as expected on multiplications (but not power). Some tests involving diff had to be updated to reflect that behaviour.
Change-Id: Ifa32031bc37a156c18d296757bcdd6ccdb0ea43e
2020-11-04 14:45:34 +01:00
Léa Saviot
9e94304db0
[poincre/test] Rename assert_simplify -> assert_reduce
...
And assert_expression_simplify -> assert_expression_reduce
2020-07-16 11:46:23 +02:00
Charlotte THOMAS
7754693bdf
fix: change IsIS => IsSI in test too
2020-07-15 10:28:15 +02:00
Léa Saviot
cf4eaa3d1f
[apps/poincare] Use symbolicComputation in recursivelyMatches
...
This fixes a failed assertion for the scenario:
[3]->x then, in the Equation app, solve x+1->0
2020-06-15 16:20:09 +02:00
Émilie Feral
88a39c335f
[poincare] Fix Unit::IsISEnergy
2020-06-04 14:50:07 +02:00
Émilie Feral
7b2d020128
[poincare] Unit: implement IsIS
2020-06-04 14:50:07 +02:00
Émilie Feral
b6ee72bc21
[poincare] Clean tests on Unit
2020-06-04 14:50:07 +02:00
Émilie Feral
3f34e5e644
[poincare] Enable to choose the "UnitConversion" mode at simplification
...
between: only SI, none, default...
2020-06-04 14:50:01 +02:00
Émilie Feral
d805c59202
[poincare] Fix extractUnit into removeUnit paradigm
2020-06-04 14:50:01 +02:00
Ruben Dashyan
c71cce2957
[poincare/test] Factor assertions
2020-06-04 14:50:01 +02:00
Ruben Dashyan
bf9653d510
[poincare/expression] Turn getUnit into extractUnits
...
Addition::shallowReduce factors the unit across its terms.
Previously expressions of the form 1_m+π_m were reduced to undef.
2020-06-04 14:50:01 +02:00
Ruben Dashyan
0c4434d088
[poincare/expression] getUnit returns an uninitialized Expression
...
when there is no Unit instead of Undefined
2020-06-04 14:50:01 +02:00
Ruben Dashyan
f5b964339c
[poincare/test/expression_properties] Fix helper assert_reduced_expression_unit
...
First reduce
Then getUnit
2020-06-04 14:50:01 +02:00
Léa Saviot
308ffb3e3c
[poincare/test] Add tests on getUnit
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
6a57b46f8d
[poincare.test] Add tests on symbolic computation
2020-02-12 15:13:24 +01:00
Léa Saviot
470b713226
[test] Fix tests for new SymbolicComputation parameter
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
756eeeb2d8
[poincare/parser] Add context
2020-02-12 15:13:21 +01:00
Émilie Feral
30c4e01737
[poincare] Fix and add tests about BasedInteger
2020-02-12 15:13:19 +01:00
Ruben Dashyan
3271fc90a4
[poincare/test] Clean header inclusions
2020-02-12 15:13:16 +01:00
Ruben Dashyan
c3cf5c1ef4
Rename UCodePointUnknownX to UCodePointUnknown
2020-02-12 15:13:15 +01:00
Émilie Feral
ccf848a9eb
[poincare] Add test: do not expand multinome when reduction target is
...
System
2019-11-21 09:47:16 +01:00
Émilie Feral
6c203a545a
[poincare] Fix Expression::isReal method with Matrix reducing
2019-08-14 09:38:28 +02:00
Émilie Feral
eb0f6153c5
[poincare] When reducing expressions, we check if an expression is a
...
matrix to know if it can be permuted in a multiplication for example.
This check has to be 'recursive'/'deep' to detect cases like "cos(3×confidence(cos(2)/25,3))"
2019-08-14 09:38:27 +02:00
Émilie Feral
9fbec16db4
[poincare] Merge MultiplicationImplicit and MultiplicationExplicit (they
...
were required if we wanted to parse into two distincts expression 2π and
2*π but don't)
2019-08-08 17:22:05 +02:00
Émilie Feral
d9c2a3cac0
[poincare] Add tests in expression_properties (IsApproximate, IsMatrix,
...
sign, IsInfinity...)
2019-08-08 17:22:05 +02:00
Émilie Feral
c1cd0302b8
[poincare] Fix typo: explicite --> explicit, implicite --> implicit
2019-08-08 17:22:04 +02:00