Commit Graph

3284 Commits

Author SHA1 Message Date
Émilie Feral
39ca735f21 [poincare] Improve Logarithm::shallowReduce
Change-Id: Ie0f4c0cb25f7c62c65786f7b3a47583ed7323770
2017-11-17 17:11:36 +01:00
Émilie Feral
3f48f49fbe [poincare] Fix infinite loop in power
Change-Id: I9b1ce1500303cbe880a75ac87c09a36721426332
2017-11-17 16:51:06 +01:00
Émilie Feral
4c01e6a8ce [poincare] Fix infinite loop in logarithm
Change-Id: Ic70f2d236af9895a468a57953a446db496a54f2f
2017-11-17 16:50:55 +01:00
Émilie Feral
1d89a8602f [poincare] Add a context to setExpressionForSymbols in Context
Change-Id: I68b768aec350b75bfcf54a5bede2f9b1cdff7e20
2017-11-17 15:45:11 +01:00
Émilie Feral
9c98cec0d8 [poincare] Implement writeTextInBuffer for symbols using special chars
Change-Id: Ie3de762f3a5fb8d38866fe904ae1b9d7e7486e41
2017-11-17 15:31:51 +01:00
Émilie Feral
c1cd85e191 [poincare] Inverse symbol and value order in Symbols to fix infixLayout
Change-Id: Ibc29a0d6819b1e3d3de1c2ea140a57cf85b20129
2017-11-17 15:31:24 +01:00
Émilie Feral
04df91df97 [poincare] Fix symbols and context
Change-Id: I0a4505d0e21b8865f1babc3c9bb5977b509e73fe
2017-11-17 14:24:48 +01:00
Émilie Feral
37dd3db06e [poincare] Do not simplify expressions with matrix
Change-Id: I0b4c5fabf3e0669c50ecefc95a2896e945b8c5d9
2017-11-17 13:34:47 +01:00
Émilie Feral
2120c9c98e [poincare] Enable to clone empty dynamic hierarchy
Change-Id: I4579402bcbc0c9545beee524c5bf9aa3d4a359d0
2017-11-17 13:34:47 +01:00
Émilie Feral
7e6db9daf0 [poincare] Fix sorting on dynamic hierarchy
Change-Id: I6d86a562d0d035a0fae1901d33d010b15170408b
2017-11-17 13:34:47 +01:00
Émilie Feral
b3f8156cfe [poincare] Fix Expression::IsMatrix
Change-Id: I7956ba5c293431f91020e2211245da8fafdd5e1b
2017-11-17 13:34:47 +01:00
Émilie Feral
bfcd1377e6 [poincare] In Simplification order, matricial node are the biggest nodes
Change-Id: I2c5e391eb6f6476123199906575485c8635eb672
2017-11-17 13:34:47 +01:00
Émilie Feral
49257959a5 [poincare] Fix bug: transform M^(-1) into inverse(M) to avoid trying to
put a matrix at denominator everywhere

Change-Id: I0de866f22df952fa26f93c875b40131749a8db1e
2017-11-17 13:34:47 +01:00
Émilie Feral
8df9bc7b14 [poincare] Rule: e^(i*pi*r) -> cos(r*pi)+i*sin(r*pi)
Change-Id: I9afa1903a5bd38896d9b39aa15658110f493d06f
2017-11-17 13:34:47 +01:00
Émilie Feral
6cb9ccbe63 [poincare] Rule i^r -> e^(iPir') with r rational
Change-Id: I6453406e6888776844c0fe1ff0c7fe2a450d1f6e
2017-11-17 13:34:46 +01:00
Émilie Feral
e651a62ddb [poincare] Treat I as a symbol instead of evaluating at parsing
Change-Id: I95d7bb1e1a85784622bc8780ebd8b8d90c822e6d
2017-11-17 13:34:46 +01:00
Émilie Feral
53c66baa16 [poincare] Re-enable matrix in simplified expression-> handle matrix in
evaluate

Change-Id: I455845398f0799b9e25fd192ada7478c872ab892
2017-11-17 13:34:46 +01:00
Émilie Feral
47621e0cf4 [poincare] Fix bug in writeTextInBuffer in Power: Power(2,Pi+cos(2)) ->
2^(Pi+cos(2)) (do not forget parenthesis)

Change-Id: I841d28412891efd8569501775c472f9f6d34c242
2017-11-17 13:34:46 +01:00
Émilie Feral
9185310734 [poincare] add tests
Change-Id: I623ed6797cf4a76db0d4f7dd62fb666f0cbb3081
2017-11-17 13:34:46 +01:00
Émilie Feral
fcc95446b6 [poincare] Improve Real part shallowReduce
Change-Id: Iaa4fb37ca1ea7dda73915c4e02d98c52fb8868d5
2017-11-17 13:34:46 +01:00
Émilie Feral
f59581b313 [poincare] We do not have to put matrix at root anymore as matrix are
going to be handle in evaluate soon

Change-Id: Id04c164148ce4ef3fc1be078c3ea73801ac7c0a8
2017-11-17 13:34:46 +01:00
Émilie Feral
12bc4308d2 [poincare] Fix PredictionInterval::shallowReduce
Change-Id: Id0e3677c78e2925834027be43080df9bcb951d6b
2017-11-17 13:34:45 +01:00
Émilie Feral
969423f5ba [poincare] add tests
Change-Id: Iae3c6e4b5c27ecc8649f96cc8d85319a8847b1ab
2017-11-17 13:34:45 +01:00
Émilie Feral
e0abe28b85 [poincare] Fix Matrix Trace shallowReduce
Change-Id: Iad72771ec1f178554c6eb92398ec59188f7809b3
2017-11-17 13:34:45 +01:00
Émilie Feral
9871894363 [poincare] Enable to detachOperand of uncomplete expression
Change-Id: If75a8c3d432796720c83d393b66d8602494c1a5c
2017-11-17 13:34:45 +01:00
Émilie Feral
563d9f989c [poincare] add tests
Change-Id: I5afc4c7f0232bb50af2f3ffdbfe2678c8f114237
2017-11-17 13:34:45 +01:00
Émilie Feral
d91a0dfb92 [poincare] Add rule log(a*b)=log(a)+log(b) if a,b>0
Change-Id: I5912d25ad838f1e5ef9219a8d126d0b4ab0de10b
2017-11-17 13:34:45 +01:00
Émilie Feral
59ca69647e [poincare] Clean tests
Change-Id: Idf75977f3426c4235080282d9a8fba07e74b424a
2017-11-17 13:34:45 +01:00
Émilie Feral
75246e9bbd [poincare] Improve ImaginaryPart::shallowReduce
Change-Id: I6506fd11447d30da1ec56b31cbb13c385a209021
2017-11-17 13:34:44 +01:00
Émilie Feral
011eee0841 [poincare] Add tests
Change-Id: I5c534524a1929f93052ac47e03db32ac9bb86e66
2017-11-17 13:34:44 +01:00
Émilie Feral
b6a0733fea [poincare] Handle edge case in removeZeroAtTheEnd of the mantissa
Change-Id: I8e73d99037fe7f7c280730844b4ec6ebef4d3474
2017-11-17 13:34:44 +01:00
Émilie Feral
3585023b83 [poincare] Improve Conjugate::shallowReduce
Change-Id: I507f63271a60a53e8f925b61540097bbb5cf4974
2017-11-17 13:34:44 +01:00
Émilie Feral
6b7eea2146 [poincare] Fix Confidence Interval shallowReduce
Change-Id: I45f3f7ee695f1b524fef4eeca41d8d5dfa344b37
2017-11-17 13:34:44 +01:00
Émilie Feral
8289264cfa [poincare] Fix BinomialCoefficient::shallowReduce
Change-Id: Iafc84162427db910e0c208297efe9904ce768313
2017-11-17 13:34:38 +01:00
Émilie Feral
efd108b91f [poincare] Fix simplification engine and add tests
Change-Id: Ibde03afc9036baf8562c8c635874f4188e1f7f6d
2017-11-17 13:32:58 +01:00
Émilie Feral
f73c15d055 [poincare] Add matrix inverse test
Change-Id: If274e187f62dbc3cd6614aff852af94762333e34
2017-11-17 13:32:57 +01:00
Émilie Feral
7e68cbf386 [poincare] Fix bug when converting double to decimal: 0.999999999999999
exponent is -1 but it is stored with a mantissa of 1

Change-Id: I48f79a7aacc9fc69674f7d32e49d2d528f80ca16
2017-11-17 13:32:57 +01:00
Émilie Feral
a4e06e123f [poincare] Implement comparison on decimal
Change-Id: I87cd42d9b1bbae0e0bb68cd2dcd6449dee9910a5
2017-11-14 16:30:21 +01:00
Émilie Feral
3bd3b964c0 [poincare] Add Pi/10 in Trigonometry cheatTable
Change-Id: I193e50d2cc4dd4641bf76ba6ce6583e3d5dfbefd
2017-11-14 10:52:05 +01:00
Émilie Feral
acbae8e07e [poincare] Improve Logarithm::shallowReduce
Change-Id: I4e1aedb04950c958e4a3c1a53aea8ab5ee919901
2017-11-14 10:25:55 +01:00
Émilie Feral
1f86a41a63 [poincare] Power::shallowReduce : x^log(y,x) -> y if y > 0
Change-Id: I6953295d006bc9edd31f47ca43fd44aa2c1f90f2
2017-11-10 23:58:29 +01:00
Émilie Feral
44434a3e17 [poincare] Add a rule in Logarithm::shallowReduce
Change-Id: Ib3c4bc485065865e2579869c5d151c2bdf6a2b3a
2017-11-10 23:58:28 +01:00
Émilie Feral
07751b5aff [poincare] Add test for matrix addition, multiplication and positive
power

Change-Id: I3638c741e2d2ade724f48b3b4ec30c98c24cd5bf
2017-11-10 23:58:28 +01:00
Émilie Feral
378b54820d [poincare] Fix bug in recursively match
Change-Id: Iae03ed3440bd1f1ca39aef04f57bd36dc7bf036a
2017-11-10 23:58:28 +01:00
Émilie Feral
c0a0227fe6 [poincare] In matrix, createDeterminant and createInverse create Decimal
or a matrix of Decimal

Change-Id: Ia0cc88ff3b5f1110831717c48e1d801222c68707
2017-11-10 23:58:28 +01:00
Émilie Feral
ecf5f05773 [poincare] Decimal::shallowBeautify
Change-Id: I2b23a0c2b6ebb700c88012a5b3d53654cc65d480
2017-11-10 23:58:28 +01:00
Émilie Feral
ed6c6d2b20 [poincare] Add a constructor in Decimal to build from a double
Change-Id: If00cd2cff8fa254a95c28a807df5db5857a2d577
2017-11-10 23:58:20 +01:00
Émilie Feral
81b3a544d9 [poincare] Fix writeTextInBuffer of Decimal to handle negative decimal
Change-Id: Ie9900145eab43a402e21c1fabc6d4d2199a2169f
2017-11-10 20:17:03 +01:00
Émilie Feral
8a4af478cf [poincare] Add a constructor in Integer
Change-Id: Icf84821d1b898dbe353a2ee3cda7cfbb5c0b5468
2017-11-10 18:19:15 +01:00
Émilie Feral
045c02a213 [poincare] Fix setNegative in Integer
Change-Id: I32515c23c8897a3ce1d1cd4f238340397efc3366
2017-11-10 18:16:46 +01:00