Commit Graph

54 Commits

Author SHA1 Message Date
Gabriel Ozouf
c7b758f536 [poincare/expression] Fix solutions to e^x=0
Because of the limitations of the floating-point representation, e^x is
null for x <= 710, causing the nextRoot functions to find roots for it.
To prevent this, we looking for places where a function changes sign, we
actually require the function to take two non-null values of different
signs.
2020-12-14 10:20:09 +01:00
Gabriel Ozouf
1e7babadb8 [solver] Change angle unit before test
A test in equation_solve relies on the angle unit being set to Degree,
but doesn't actually set it. Changing the angle unit to another one in a
test prior would break this test.

Change-Id: I6785b087f171d46226d484ebaa3ebdc9e791cedc
2020-12-07 15:58:56 +01:00
Arthur Camouseigt
913c81a0d3 [solver] Modified the way to solve some equations
The solutions of equations that need numerical approximations to be
solved are now computed base on the undeveloped equation (instead of
fully the expended one used to identify polynomials)

This allow (x-10)^7=0 to yield x=10 as result (9.95 before)
Change-Id: Ia8acbe57a9cfebf0b5016e9c896d21c8ddac7a64
2020-11-04 15:32:59 +01:00
Gabriel Ozouf
fad375c11c [poincare] Add unitFormat to ReductionContext
Change-Id: I1d3fcd2f47c973c041e1be84e9a902dd58de3562
2020-11-04 15:11:44 +01:00
Léa Saviot
9bd411f405 [apps/solver] Add test about failing equation resolution 2020-06-08 17:10:02 +02:00
Léa Saviot
c2bd19d9a1 [apps/solver] Fix polar tests 2020-04-15 09:16:32 -04:00
Romain Goyet
56f3204a17 [apps/solver] Fix the polar tests 2020-04-15 09:16:32 -04:00
Romain Goyet
870d704e7f [apps/solver] Rewrite the tests to they can be read by a human being 2020-04-15 09:16:32 -04:00
Romain Goyet
5faa251c1f [apps/solver] Quiz assertion are supposed to run in release mode too 2020-04-15 09:16:32 -04:00
Léa Saviot
2ed354710f [build/simulator] NDEBUG flag in release mode
This way, asserts are not performed on simulator platforms
2020-04-10 00:49:15 -07:00
Léa Saviot
76e0deb9bf [tests/solver] Test solve equation with max number of variables 2020-04-01 11:47:19 +02:00
Émilie Feral
533f1312db [solver] Add test with 6 variables 2020-02-12 15:13:25 +01:00
Léa Saviot
3b80b747b2 [test/solver] Add more tests 2020-02-12 15:13:24 +01:00
Léa Saviot
25ef10a0c5 [tests/solver] Add test on solver + user defined symbols 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
a3a1f86f8d [apps] Add context parameter to fix tests 2020-02-12 15:13:21 +01:00
Émilie Feral
c659cc7477 [poincare] EquationStore: add tests 2019-11-21 09:47:16 +01:00
Émilie Feral
081462ab5e [poincare] Fix tests with Multiplication serialization (it always add
the × operator
2019-08-08 17:22:06 +02:00
Émilie Feral
cedcab21ec [poincare] Tidy tests and add TODO for tests that need to be completed 2019-08-08 17:22:04 +02:00
Émilie Feral
f546845279 [apps] Test: fix calculation and equation test with layout and
expression seriazlization
2019-08-08 17:22:03 +02:00
Émilie Feral
d0fb30028e [poincare] Use '×' instead of '·' when pressing multiplication key 2019-08-08 17:22:02 +02:00
Léa Saviot
61cf762eef [poincare] Expression::ReductionContext 2019-08-08 16:29:37 +02:00
Léa Saviot
2fdbf2ea11 [poincare] VerticalOffsetLyt serializes as ^().
UCodePointLeftSuperscript and UCodePointRightSuperscript no longer exist
2019-06-26 14:03:08 +02:00
Léa Saviot
6455891b77 [apps/test] Silence unused variable warning 2019-06-26 14:03:08 +02:00
Léa Saviot
40c5196cee [test] Use strcmpWithSystemParentheses
Now there can be two types of parentheses : '(' or
UCodePointLeftSystemParenthesis. Because we do not want to complicate
the test results, when comparing a computed serialization and a result
we do not differentiate between the two types of parentheses.
2019-06-26 14:03:08 +02:00
Léa Saviot
bcfe9469e8 [apps/tests/solver] Test equations + symbolic computation 2019-05-03 15:53:21 +02:00
Léa Saviot
a9e4737dea [apps/solver] Test: conj(x)*x+1 should not be considered as polynom 2019-05-03 15:53:21 +02:00
Émilie Feral
6566b08400 [solver] Fix tests with new Equation API 2019-05-03 15:53:20 +02:00
Léa Saviot
bbb10f1993 [ion/kandinsky] Move unicode to ion 2019-05-03 15:53:19 +02:00
Léa Saviot
6b6d3d7fe2 [tests] Fix unicode for tests 2019-05-03 15:53:19 +02:00
Léa Saviot
65e5adafac Remove Ion::Charset 2019-05-03 15:53:19 +02:00
Émilie Feral
b3a8441289 [solver] Fix tests on EquationStore: delta discriminant is counted as a
solution
2019-01-10 11:42:05 +01:00
Émilie Feral
95248edde0 [poincare] Fix tests with new beautify order 2019-01-10 11:42:04 +01:00
Émilie Feral
ab555888aa [solver] Clean and add tests on non-real equations 2019-01-10 11:42:04 +01:00
Émilie Feral
d66d71a152 [solver] Fix tests on unreal equations 2019-01-10 11:42:04 +01:00
Émilie Feral
aa80710f4d [solver] Take into account the complexFormat Real 2019-01-10 11:42:04 +01:00
Émilie Feral
df2f6e3b6e [poincare] Fix tests with complex cas 2019-01-10 11:42:03 +01:00
Léa Saviot
0ecaea0695 [poincare] Fix power serialization 2018-11-26 14:07:42 +01:00
Léa Saviot
3e12f83bb1 [tests] Fix with new serializations 2018-11-23 12:04:10 +01:00
Léa Saviot
94603b2b7d [poincare] Layout::serialize is serializeForParsing or ParsedExpression
serializeForParsing serializes the layout once,
serializeParsedExpression serializes the layout, parses it and
serializes it again.
2018-11-23 12:04:09 +01:00
Émilie Feral
0609f0c982 [solver] Test: delete test with too long variable: symbols of more than
7 characters will not be parsed
2018-11-23 12:04:07 +01:00
Léa Saviot
2727485af0 [apps/solver] Add tests with long variable names 2018-11-23 12:04:05 +01:00
Émilie Feral
432713fbb6 [poincare][solver] Variable whose names are too long are not parsed
anymore
2018-11-23 12:04:04 +01:00
Léa Saviot
da226f7861 [tests] Fix GlobalContext namespace and duplicate test 2018-11-23 12:04:01 +01:00
Léa Saviot
438968384c [tests] Fix them by using the new APIs 2018-11-23 12:03:59 +01:00
Émilie Feral
6113f97027 [solver] Display warning when one of the variable name exceeds 10
characters
2018-11-23 12:03:58 +01:00
Émilie Feral
75a1de32ed [solver] Fix EquationStore with variable-sized variables 2018-11-23 12:03:58 +01:00
Lionel Debroux
1a8c6b6ae9 [poincare, escher, ion, apps] Split the huge umbrella header poincare.h, to reduce build time.
This should be a NFC, but surprisingly, it also reduces size... so what does it change ?
2018-10-23 11:49:09 +02:00
Léa Saviot
aaf5cee967 [poincare] make tests compile 2018-09-10 09:54:37 +02:00
Émilie Feral
a1bcbe28e6 [quiz] Turn all assert in quiz_assert 2018-08-28 10:40:52 +02:00