Commit Graph

85 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
37dd3db06e [poincare] Do not simplify expressions with matrix
Change-Id: I0b4c5fabf3e0669c50ecefc95a2896e945b8c5d9
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
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
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
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
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
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
3bd3b964c0 [poincare] Add Pi/10 in Trigonometry cheatTable
Change-Id: I193e50d2cc4dd4641bf76ba6ce6583e3d5dfbefd
2017-11-14 10:52:05 +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
b53716cd2b [poincare] Fix sin/cos handling: resolve them in
Multiplication::shallowReduce instead of Division::beautify

Change-Id: Icca0ed012920b5f392ed72573f8e1d201b934665
2017-11-09 15:17:28 +01:00
Émilie Feral
01db0e4576 [poincare] In Power::removeSquareRootsFromDenominator, also handle
sqrt(p/q) with q != 1

Change-Id: I07be2ba74985ba1df7310b00446ba4af1ea61b69
2017-11-09 12:05:27 +01:00
Émilie Feral
2f3650a62f [poincare] Logarithm::shallowReduce: add law log(x^y)->ylog(x)
Change-Id: I70025749a67ca721e9f753396b0df5da2b3309b5
2017-11-07 14:59:49 +01:00
Émilie Feral
5cdd47a114 [poincare] Fix tan(pi/8) table in trigonometry
Change-Id: I874864c6ac218b3cbcdbe3d68ffd57a1c56c1b0c
2017-11-07 10:52:40 +01:00
Émilie Feral
dee9ec62c1 [poincare] Change name: simplify--> Simplify
Change-Id: I6430468ce12fe1debe5023b0a1215726b17d9f50
2017-11-03 15:33:39 +01:00
Émilie Feral
9263ea6366 [poincare] Fix bug in Division::beautify (sin/cos->tan)
Change-Id: I4e4545a977d054370c87855e12b0dcbc2846af5d
2017-11-03 13:17:33 +01:00
Émilie Feral
6a7a653843 [poincare] New unary tests
Change-Id: Ic58b2bb956dbacceaedb7b829bf9b9490c24ebce
2017-11-02 13:48:14 +01:00
Émilie Feral
13ef08d628 [poincare] Change Expression::compareTo to SimplificationOrder
Change-Id: I0f3dff0a0933f55164573623253ee24f1a85d2a7
2017-10-31 11:25:12 +01:00
Émilie Feral
dbddba007e [poincare] Change names of simplify and beautify and made them private
Change-Id: I1a261cd272e524746896601cd28dd311c5e874c7
2017-10-30 17:57:26 +01:00
Émilie Feral
f7065717af [poincare] Rational::immediateSimplify: (-1)/3 -> - (1/3)
Change-Id: Ie92c1e852b85214c41ec328cf6e4f0f360e48e16
2017-10-27 14:33:55 +02:00
Émilie Feral
c5a5a48836 [poincare] Change 1+-6*cos(2) -> 1-6cos(2)
Change-Id: Ic5dde9bf2f8a76d17a34544be0d17beaf94f6905
2017-10-27 14:06:42 +02:00
Émilie Feral
91d50bd4e1 [poincare] Get rid of square root at denominator
Change-Id: I5cfc06d147159ea072f97edb8b92c920272ba184
2017-10-27 11:51:59 +02:00
Émilie Feral
86d23dd0f5 [poincare] Avoid square root monome at denominator
Change-Id: I93e55dce3a8e1b3c8db9721a081b376e8a8a0099
2017-10-26 17:57:17 +02:00
Émilie Feral
dc11739c39 [poincare] Trigonometry in Degree
Change-Id: I755b03b5149e189278fc9a89c1d273b0168d0f20
2017-10-26 15:09:45 +02:00
Émilie Feral
700126f26b [poincare] Add arccos(-x) = Pi-arccos(x), arcsin(-x) = - arcsin(x) and
arctan(-x) = -arctan(x)

Change-Id: I48d9fa5fa70f53a545917e1a309025cbbacf8ed8
2017-10-26 14:58:37 +02:00
Émilie Feral
3cc7b1fe74 [poincare] Fix principal angle in [0, Pi/2[ in Trigonometry
Change-Id: I7b19cd90e9ef98341867ad0e2002e092eb31b4a3
2017-10-26 11:27:28 +02:00
Émilie Feral
8fcdcbb773 [poincare] add tests
Change-Id: I96232633c170cb26d36ccb12fcf3b560368219e7
2017-10-26 10:08:57 +02:00
Émilie Feral
57b9d996a7 [poincare] ArcTangent::immediateSimplify
Change-Id: I9c1f8d817361d625ccf8c1732d6886edf8d7118f
2017-10-26 10:01:14 +02:00
Émilie Feral
abec9f5572 [poincare] immediateSimplify of ArcSine
Change-Id: I3543919c259e79efe0a8ed4a04a6b4a301704c86
2017-10-26 10:01:14 +02:00
Émilie Feral
f14b2a9e42 [poincare] Implement Factorial::immediateSimplify
Change-Id: I7bd7b3fd41421ebc8536d5dca4a261435022f7a7
2017-10-26 10:01:13 +02:00
Émilie Feral
0feb55fc02 [poincare] Fix bug in Trigonometry::immediateSimplify
Change-Id: I698d91f262df242e272de4fbe64dd76f54087757
2017-10-26 10:01:13 +02:00
Émilie Feral
e3057d5c2b [poincare] Change multiplication sign
Change-Id: If58f62fa181ce7aac441d42d44ea65d68f0d6421
2017-10-25 18:19:01 +02:00
Émilie Feral
a1c15dd84d [poincare] First version of ArcCosine::immediateSimplify
Change-Id: I416db89ab4e689c082bf773d28575ee5b0e1a0ca
2017-10-25 18:19:01 +02:00