Commit Graph

7312 Commits

Author SHA1 Message Date
Émilie Feral
9f180afa33 [poincare] log(x, -3) is undefined
Change-Id: If8a61bf4e7ffe9958834c52b878058c8217608a9
2017-10-12 15:26:55 +02:00
Émilie Feral
6b39093bac [poincare] Implement NaperianLogarithm::immediateSimplify
Change-Id: I1e07e283a2aab8ae8bd3e61867030e9ece76eedf
2017-10-12 15:26:27 +02:00
Émilie Feral
0bd5a05125 [poincare] Fix bug in Logarithm::clone
Change-Id: I2be94e5159ae0bf664c9ca91322706910fb1e011
2017-10-12 15:13:58 +02:00
Émilie Feral
6d8bf23107 [poincare] Implement Logarithm::immediateSimplify
Change-Id: Ie2253da85c76860e10b9cf0bb4967b464c288a74
2017-10-12 15:02:44 +02:00
Émilie Feral
2cfaed4366 [poincare] Change default immediate simplify
Change-Id: I427b3b6d50bc47bf3fe2d64df263d40f9ecf79e0
2017-10-12 14:51:17 +02:00
Émilie Feral
e9074b25ec [poincare] Fix potential bug in Power
Change-Id: I71b495dbe400730f3c51378579c1437617b368ca
2017-10-12 14:08:53 +02:00
Émilie Feral
bb7278ad68 [poincare] Improve Power::immediateBeautify
Change-Id: I8440ff00f598a27e5808a2a7f96e73ae19d02ecd
2017-10-12 12:05:12 +02:00
Émilie Feral
79ded1be36 [poincare] In Addition::immediateSimplify, resolve on same denominator
Change-Id: I64bb666a2660b84168a9d0e5b36551723f56c1c0
2017-10-12 11:50:19 +02:00
Émilie Feral
64b3824119 [poincare] immediateSimplify should return Expression *
Change-Id: Ib0464cca0095095e022788c3a9c183eec600cf88
2017-10-12 11:47:52 +02:00
Émilie Feral
87c46bd9c3 [poincare] Fix bug in Multiplication::sign
Change-Id: I1da7c40f6745f8452cd44fd56c245f53113765ab
2017-10-12 10:27:09 +02:00
Émilie Feral
2b72316792 [poincare] Factorize Multiplication twice (before and after
distributing)

Change-Id: I271e8b6285fafd8dbe6520167435cdc65838e06b
2017-10-12 10:14:29 +02:00
Émilie Feral
6db3242193 [poincare] Clean
Change-Id: Ia21be93687035b302286a178a91f4a676f052c5b
2017-10-12 10:12:01 +02:00
Émilie Feral
772b34773b [poincare] Beautify : -1*A-> -A
Change-Id: I6ae4d5a5013761103c771268983d5b4e1f2ef4da
2017-10-11 16:07:14 +02:00
Émilie Feral
304ba3fb30 [poincare] Add Power::immediateBeautify
Change-Id: Ibd325346d92288f269577569029cb851c24df5fc
2017-10-11 15:37:19 +02:00
Émilie Feral
90db4e0bd9 [poincare] Change design of immediateBeautify
Change-Id: Ifb30b89b30af1df7eca855cc2cea2da75206fc96
2017-10-11 15:36:54 +02:00
Émilie Feral
5b11c16435 [poincare] In Multiplication::beautify 1/3*Pi^-1-> 1/(3Pi) instead of
(1/3)/pi

Change-Id: Id29e08d3a51a0f61a140aaeb7f6f4d3adb387160
2017-10-11 12:19:29 +02:00
Émilie Feral
7898fcbf91 [Poincare] Mulitiplication::immediateSimplify always merge negative
powers at the end

Change-Id: I65cb22c12711e28229826f23fab816617c1ec10f
2017-10-11 11:59:27 +02:00
Émilie Feral
ce050253fb [poincare} Resolve bug in dynamicHierarchy::simplify
Change-Id: Iad798f0c51c29ba49e79b63ceab70225a75d495a
2017-10-11 11:44:42 +02:00
Émilie Feral
26f2b410ac [poincare] Correct bug in Multiplication::immediateBeautify
Change-Id: I2097befbe000948d106121929d79c6101e1edef6
2017-10-11 09:43:50 +02:00
Émilie Feral
5b9045fe91 [poincare] Fix bug in Multiplication::factorizeBase
Change-Id: If3ffc258c832e30f827eecb0a7c4e543341b5a21
2017-10-10 18:08:27 +02:00
Émilie Feral
ffd49d81a5 [poincare] Division::immediateBeautify
Change-Id: I76f0f5a6a8cb46eda10f6e94f9817e1acd9df3f2
2017-10-10 17:46:26 +02:00
Émilie Feral
9a604a042b [opincare] Fix bug in Power::simplify
Change-Id: I30784cd6262efe5e00c21e2fef5f34a0e5b51f14
2017-10-10 17:46:06 +02:00
Émilie Feral
bc2f6539ee [poincare] Clean
Change-Id: I132f49f26ccd1391051ac56acfebf4460e2bffb3
2017-10-10 17:45:51 +02:00
Émilie Feral
2e3e53a6bc [poincare] Clean
Change-Id: Ieb154935f5038ccc92a4be86b588736afe5f4c92
2017-10-10 16:17:14 +02:00
Émilie Feral
56fb716a00 [poincare] in Multiplication merge negative power at the end of simplify
Change-Id: Ic201e550fc0ec878c198efc71a77c441e4553560
2017-10-10 15:57:46 +02:00
Émilie Feral
7449e4e5f6 [poincare] Avoid infinite reciprocal call in
simplifyRationalRationalPower

Change-Id: I4eeec4893dfffdb96f4b1dd0f92e05f8b397cd75
2017-10-10 15:57:02 +02:00
Émilie Feral
2cacda6d20 [poincare] Change isPositive method by int sign()
Change-Id: I575e7a48c4d5b82c93094f772bbafd41913646cc
2017-10-10 15:56:41 +02:00
Émilie Feral
6a0d958c4e [poincare] Factorize simplify code in dynamic hierarchy
Change-Id: I0ae0ab5e08e4661e6eab1344baf35a535d31cd04
2017-10-10 12:08:57 +02:00
Émilie Feral
6be0cb8b94 [poincare] Implement Addition::immediateBeautify
Change-Id: I98307a12937b5c4a9100a2040f2782521c523f9b
2017-10-10 11:57:12 +02:00
Émilie Feral
3d4a3789e3 [poincare] Add a simple test in rational
Change-Id: Idd94d1a6a3c6fa9173e99f0313b6abf07034c382
2017-10-10 11:56:53 +02:00
Émilie Feral
22250d9d91 [poincare] Clean code in Multiplication::simplify
Change-Id: If5fa80f4b6414c544c69a7f2384e95c4954b62ce
2017-10-10 11:56:35 +02:00
Émilie Feral
d8b1ad962b [poincare] Add a method beautify on expressions
Change-Id: Ib5cb1b595365518c9a33ba83da57a1b4d03b9385
2017-10-09 18:00:53 +02:00
Émilie Feral
4aeeb51516 [poincare] add comments
Change-Id: I2eaf9b49d341d1e0405318662de91a4ea35c14af
2017-10-09 17:57:31 +02:00
Émilie Feral
29bf984c70 [poincare] Fix bug in Simplify of dynamic hierarchy
Change-Id: I9967e740f268d55ea36d24b32546037e02564c36
2017-10-09 17:54:06 +02:00
Émilie Feral
c2670464f5 [poincare] Clean
Change-Id: Ib3b909f68d2532b9f59b04f4cefce4cd9bb10ab5
2017-10-09 16:46:11 +02:00
Émilie Feral
aac7650339 [poincare] Tests
Change-Id: I89e635deb09dbb26927b70e7b6d63961d126f747
2017-10-09 16:38:59 +02:00
Émilie Feral
3f0972d499 [poincare] Fix bug in Power::simplify
Change-Id: I91c543961b90116755ee11e4f11725c8df059923
2017-10-09 16:37:58 +02:00
Émilie Feral
0de79d8dc0 [poincare] Lex "undef" as an expression Undefined()
Change-Id: I12595c7264c06d80d187d725a647b97c89807865
2017-10-09 16:15:57 +02:00
Émilie Feral
7726d5131a [poincare] Fix bug 0^0 = 1
Change-Id: I25c55f497fa78ed4092928ca4438fc8181bcf9cc
2017-10-09 16:05:10 +02:00
Émilie Feral
afdd40c1b8 [poincare] Implement NthRoot::simpligy
Change-Id: I560ad496557782b7df461b28d74f3f0f520ba5e4
2017-10-09 15:42:40 +02:00
Émilie Feral
2112652a44 [poincare] Add rule in Multiplication::simplify
Change-Id: I851efee644f4cf11cf9358387403f83179d88aff
2017-10-09 15:42:16 +02:00
Émilie Feral
76411a9f7b [poincare] Implement AbsoluteValue::simplify
Change-Id: Ic7951ba78ba81441395a15a8019aaf3579b14c75
2017-10-09 14:13:55 +02:00
Émilie Feral
a0248deaee [poincare] Improve Power::simplify
Change-Id: I7514ccde02ab92db84778ba385703169b7636ce1
2017-10-09 14:08:22 +02:00
Émilie Feral
5ddcbbe4b7 [poincare] Implement isPositive for symbols Pi and e
Change-Id: I6fb3f605eaf62848b2e90b186c9adb00b330f91d
2017-10-09 14:02:16 +02:00
Émilie Feral
ea7a22aaa4 [poincare] Fix bug in power::simplify
Change-Id: I29b843a87d2fd4d6327e43c2fda06e5d47573b28
2017-10-09 13:30:57 +02:00
Émilie Feral
a61470e84a [poincare] Fix primeFactorization to factorize any number (no bound
anymore)

Change-Id: I389124fcca03843aadcae4a6d5db10188f14c194
2017-10-09 12:03:15 +02:00
Émilie Feral
63583eb972 [poincare] Implement SquareRoot::simplify
Change-Id: I4c9c5be24c2c85c8750d9f2a530b452ddcc68a6b
2017-10-09 11:48:44 +02:00
Émilie Feral
0326ade090 [poincare] Clean
Change-Id: Iffbfdb053cae2853a35041041716026a26fe4e74
2017-10-09 11:34:50 +02:00
Émilie Feral
e5a581680a [poincare] In power::simplify, implement rule 2^(2+Pi)->4*2^(Pi)
Change-Id: Ic884c721039908df56f7c1a3fe5fee27495d9027
2017-10-09 11:34:07 +02:00
Émilie Feral
0eaaa9f00d [poincare] Fix bug when comparing expression
Change-Id: I8f5703672f9918fbe81483e40d7b014e6c98d6b6
2017-10-09 11:33:06 +02:00