Commit Graph

7625 Commits

Author SHA1 Message Date
Léa Saviot
ed3018dc74 [poincare/test] Add addition tests 2018-08-20 17:05:48 +02:00
Léa Saviot
aa7e0c2ccc [poincare] Fix TreeByReference::mergeChildrenAtIndexInPlace 2018-08-20 17:05:07 +02:00
Léa Saviot
b3f6cf459c [poincare] Clean and fix Reduce codes 2018-08-20 17:04:24 +02:00
Léa Saviot
199a4386ee [poincare] Handle allocation failures in NaturalIntegerAbstract::udiv 2018-08-20 17:03:43 +02:00
Léa Saviot
73ae2a8bd6 [poincare] Fix typo 2018-08-20 17:02:54 +02:00
Léa Saviot
cd8b460001 [poincare] Escape replace/removeChild when tree is alloc fail 2018-08-20 17:01:44 +02:00
Émilie Feral
35cbdeabf5 [poincare] Rational: get numerator and denominator with 3 getters:
signedIntegerNumerator, unsignedIntegerNumerator, integerDenominator
which all return Integer
2018-08-20 15:43:12 +02:00
Léa Saviot
68d3c2f8b8 [poincare] Fix SerializationHelper::Infix typo 2018-08-20 13:56:37 +02:00
Léa Saviot
ae9be5333f [poincare] Remove logs in tests 2018-08-20 11:38:05 +02:00
Léa Saviot
7d9c6618eb [poincare] Override setSign on all Numbers 2018-08-20 11:26:07 +02:00
Léa Saviot
60cd8a2fe4 [poincare] Clean Power and be cautious we Rationals that can be numbers 2018-08-20 11:03:31 +02:00
Léa Saviot
686fae065b [poincare] Fix casts in Addition 2018-08-17 17:21:27 +02:00
Léa Saviot
d3d969021a [poincare] Implement class Float 2018-08-17 17:18:26 +02:00
Émilie Feral
cd32e15cd9 [poincare] ExpressionNode::denominator() has to return an
UninitializedExpression
2018-08-17 17:14:32 +02:00
Émilie Feral
0b9cf08f77 [poincare] Addition: replace Rational by Number 2018-08-17 17:08:56 +02:00
Léa Saviot
335c760c70 [poincare] Suppress some warnings 2018-08-17 16:48:13 +02:00
Léa Saviot
9664c65794 [poincare] Use the new cast operator on Expression in Power 2018-08-17 16:42:01 +02:00
Léa Saviot
4aa7fabdb1 [poincare] Expression casting to derived classes 2018-08-17 16:12:55 +02:00
Émilie Feral
368739e485 [poincare] Power: Newton multinome 2018-08-17 15:37:56 +02:00
Émilie Feral
b85ad1b276 [poincare] Fix ExceptionExpressionNode, AllocationFailure and
UninitializedExpressionNode
2018-08-17 14:28:55 +02:00
Émilie Feral
e6b04509cd [poincare] Rational: add tests on approximation and serialization 2018-08-17 13:55:15 +02:00
Émilie Feral
4dbcc854bc [poincare] Temporary fix Multiplication::shallowBeautify 2018-08-17 13:55:15 +02:00
Léa Saviot
e9eac428b9 [poincare] Power::shallowReduce 2018-08-17 13:23:43 +02:00
Émilie Feral
bff65e630d [poincare] Fix OppositeNode::numberOfChildren 2018-08-17 12:11:26 +02:00
Émilie Feral
f06fe953ce [poincare] Change call to Expression::shallowReduce to
Expression::defaultShallowReduce to avoid infinite loop
2018-08-17 12:10:37 +02:00
Émilie Feral
766efc21a8 [poincare] Rational: avoid useless copy, use Reference instead 2018-08-17 11:52:39 +02:00
Émilie Feral
d53d97c620 [poincare] Integer: avoid copy when possible, work with Reference 2018-08-17 11:47:21 +02:00
Émilie Feral
f3bd3f39f4 [poincare] Add tests on Rational operations 2018-08-17 11:45:26 +02:00
Émilie Feral
02e52fc6d4 [poincare] Add tests on Rational properties 2018-08-17 11:32:27 +02:00
Émilie Feral
02e76e6ca7 [poincare] Add Integer comparison test 2018-08-17 11:15:21 +02:00
Émilie Feral
719dbf4f2e [poincare] Add Rational tests 2018-08-17 11:15:21 +02:00
Émilie Feral
4d870f33de [poincare] Fix Rational constructors 2018-08-17 11:15:21 +02:00
Émilie Feral
55953cb182 [poincare] Integer: add test on static Zero 2018-08-17 11:15:21 +02:00
Émilie Feral
54b019d0df [poincare] Clean Integer tests 2018-08-17 11:15:21 +02:00
Léa Saviot
c627b5067a [poincare] Fix Ghost, AllocationF an Uninitilized nodes staticNode methods 2018-08-17 10:46:05 +02:00
Émilie Feral
466dafa2fa [poincare] Forbid unitiliazed Number (protect the method). Create a
Static Integer 0 to optimize the pool
2018-08-17 10:36:55 +02:00
Léa Saviot
4269003d1a [poincare] Copy static nodes in the pool before add/replaceChild 2018-08-17 10:34:42 +02:00
Émilie Feral
4dff3a2609 [poincare] Fix power simplification: a^(b+c+d) --> a^b*a^(c+d) instead
of a^b*a^c
2018-08-17 10:34:02 +02:00
Émilie Feral
cdd2f731f7 [poincare] Complete Integer tests 2018-08-16 16:46:36 +02:00
Émilie Feral
20bbc69c79 [poincare] Improve test helper 2018-08-16 16:46:36 +02:00
Émilie Feral
df2019061a [poincare] Increase TreePool 2018-08-16 16:46:36 +02:00
Émilie Feral
95ca623a0e [poincare] Test helper: increase the buffer size 2018-08-16 16:46:36 +02:00
Émilie Feral
7375783703 [poincare] Fix digit(0) of Integer(0) 2018-08-16 16:46:36 +02:00
Émilie Feral
e2695c36b8 [poincare] Expression: reset YYVALUE used by parsor to avoid keeping an
useless Expression
2018-08-16 16:46:36 +02:00
Émilie Feral
f10d92b4ae [poincare] Add a common header for lexer and parser to defined YYTYPE 2018-08-16 16:46:36 +02:00
Émilie Feral
9038f0d481 [poincare] Fix Rational::setDigits 2018-08-16 16:46:36 +02:00
Émilie Feral
48094850a0 [poincare] Digits are a token of the lexer instead of created at parsing 2018-08-16 16:46:36 +02:00
Émilie Feral
69b57a0b8c [poincare] Fix test helper 2018-08-16 16:46:36 +02:00
Émilie Feral
d7e11da52c [poincare] clean Integer tests 2018-08-16 16:46:36 +02:00
Émilie Feral
3371d41b2c [poincare] Integer: fix and add tests on Factorial 2018-08-16 16:46:36 +02:00