Commit Graph

3229 Commits

Author SHA1 Message Date
Émilie Feral
51cdf68b8c [poincare] Clean Multiplication::shallowReduce/shallowBeautify
Change-Id: Ib1fa7ea7f7ffa911b5499b149d67608d9887ce37
2017-11-08 14:26:12 +01:00
Émilie Feral
97b22cbe33 [poincare] Change name of static mathod in multiplication and add
comment

Change-Id: I0f6843c9d71b4628837c8b8958a09c0c3428eaa6
2017-11-08 14:21:58 +01:00
Émilie Feral
ddb3a62aba [poincare] Clean Multiplication::createLayout
Change-Id: I7ac1da6c9b58a50bbc7fcd1703132237e140e91f
2017-11-08 13:10:25 +01:00
Émilie Feral
ffe156571f [poincare] Use shortcut constructor Rational(Integer())->Rational()
Change-Id: I4af40105e19b3ee94fefd5cdc5dc4d20e76f8f52
2017-11-07 18:25:26 +01:00
Émilie Feral
fb2e0180a2 [poincare] Clean addition shallowReduce and shallowBeautify
Change-Id: Ic90d6281e63595f7523ccf7ab0a2c0ccba84577c
2017-11-07 18:24:54 +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
b56e5939bf [poincare] Valgrind
Change-Id: If1464e6f1bccf95ba2a5749f0f872be19b4eae0a
2017-11-07 14:48:11 +01:00
Émilie Feral
12b20321d1 [poincare] Resolve bug when getting rid of square root at denominator
Change-Id: I0b1a6c92c55cfb42a5be70cf9250b4906020c6f9
2017-11-07 14:19:06 +01:00
Émilie Feral
d5abdfc980 [poincare] Addition::shallowBeautify: turn 2-A+(-3)+B in 2-A-3+B
Change-Id: I6bdd878a821dd861b9adeedbf5d82e481a2e5b98
2017-11-07 14:16:55 +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
c559954afc [poincare] In addition::shallowBeautify, avoid cloning when not needed
Change-Id: I8be93bf47665919b6c25f25871a978a484baed98
2017-11-06 11:26:20 +01:00
Émilie Feral
79ad725af3 [poincare] Clean multiplication
Change-Id: I33fabd9c416b7c0cdbac6864d2bf52c439cbd890
2017-11-06 11:26:08 +01:00
Émilie Feral
b1567cf9f3 [poincare] Add an assertion in deepReduce/ deepBeautify, this must have
a parent

Change-Id: Ia23be0c62734811923133793dd5bee0859b64ca8
2017-11-06 10:32:38 +01:00
Émilie Feral
f0af91321a [poincare] Change name: simplify->reduce
Change-Id: I7291c9f46406cc0f4b612090422aaecad45115c8
2017-11-03 15:38:23 +01:00
Émilie Feral
dee9ec62c1 [poincare] Change name: simplify--> Simplify
Change-Id: I6430468ce12fe1debe5023b0a1215726b17d9f50
2017-11-03 15:33:39 +01:00
Émilie Feral
3c2876aa25 [poincare] Add a method to Reduce
Change-Id: I831b9c98dff6c15ddbf4111bd9715776b0f7bc5d
2017-11-03 15:33:12 +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
f5edfd06df [poincare] use new method addOperand instead of addOperands
Change-Id: Iee9a245bbd1c6a7f187465c2820214dd2449b4bd
2017-11-03 13:07:00 +01:00
Émilie Feral
ccb4ae0ebb [poincare] Use shortcut rational construction
Change-Id: If7e40a694ab58cb4c31227ec739cc28f76ee78b5
2017-11-03 13:06:58 +01:00
Émilie Feral
ad86e76963 [poincare] Use Static Hierarchy shortcut constructor
Change-Id: I59f58df85ed8682913bb09dd60d316a4b3c18ddb
2017-11-03 13:06:05 +01:00
Émilie Feral
bf313fff76 [poincare] Use Dynamic hierarchy shortcut constructor
Change-Id: I5a10ad7fd34d6aae09b5bfc9c7b4ada8451a7e5d
2017-11-02 14:26:59 +01:00
Émilie Feral
9a74d22bd9 [poincare] Change names: child->operand
Change-Id: Ib15e317c8166e4ad73752cc11b6597b86214b35e
2017-11-02 13:59:14 +01:00
Émilie Feral
6a7a653843 [poincare] New unary tests
Change-Id: Ic58b2bb956dbacceaedb7b829bf9b9490c24ebce
2017-11-02 13:48:14 +01:00
Émilie Feral
e41d4a21c0 [poincare] Clean
Change-Id: I6a582a850f440572c99fe215167747626de6da8c
2017-11-02 13:44:36 +01:00
Émilie Feral
4570106dba [poincare] Improve Addition::factorizeOnCommonDenominator
Change-Id: I0e0e31ae6fcb71b546a2e4b90a9d43b6868c6444
2017-11-02 13:44:14 +01:00
Émilie Feral
ef260f1f51 [poincare] Change names of cloneDenominator and addMissingFactors
Change-Id: Id204fd65dd129efc08659610afe34d6168114227
2017-11-02 13:43:28 +01:00
Émilie Feral
20714334af [poincare] In Arithmetics, add LCM
Change-Id: Iadf69597e900e9d4dc26793857fe91378bcc76c2
2017-11-02 13:37:03 +01:00
Émilie Feral
f2d8544639 [poincare] New constructor in Rational
Change-Id: I86bc434f439515104d68d45736fac2e4efd46377
2017-11-02 13:26:08 +01:00
Émilie Feral
bbc1256087 [poincare] Change API of addOperand in Dynamic Hierarchy
Change-Id: Ice6ca5d7e3725798a4aa94362fb061175540b7e8
2017-11-02 13:25:18 +01:00
Émilie Feral
86c5d29cb0 [poincare] Add a shortcut constructor in Hierarchy
Change-Id: I2b0de8ab43ae6a0503814a48a20991b4c92572ea
2017-11-02 13:24:02 +01:00
Émilie Feral
15273979aa [poincare] Clean addition
Change-Id: Ica1c102c7ef59c30323ba6a32ad7a5440bed9323
2017-11-02 13:23:10 +01:00
Émilie Feral
9636f087cc [poincare] Clean
Change-Id: Ibbdd8479337ab1204c6a53255205255e02290c17
2017-10-31 15:01:16 +01:00
Émilie Feral
889a0d8eb4 [poincare] Change natural comparison names in Integer
Change-Id: Ifdd4ef3991e650d601a378a9742ae2371915ce77
2017-10-31 12:02:31 +01:00
Émilie Feral
ae31a78ca6 [poincare] Integer: clean names
Change-Id: Ia6926ea8a506c91b933b6ca47dd8918217733221
2017-10-31 11:33:54 +01:00
Émilie Feral
13ef08d628 [poincare] Change Expression::compareTo to SimplificationOrder
Change-Id: I0f3dff0a0933f55164573623253ee24f1a85d2a7
2017-10-31 11:25:12 +01:00
Émilie Feral
29f88f05d7 [poincare] Change turnIntoPositive and sign methods and API
Change-Id: Ib3ac679ba4a8c38fa051046e43f452fc7ae3b686
2017-10-31 10:21:38 +01:00
Émilie Feral
3012e360e8 [poincare] Fix index error in Power::shallowSimplify
Change-Id: I134df29dab28060361412c97122e6b1562cffaf4
2017-10-31 10:13:24 +01:00
Émilie Feral
8fefc092b1 [poincare] Change name and API of containType
Change-Id: I57617c13a810400a13de774b0abc23db9adf9d15
2017-10-30 18:04:52 +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
fd3605a4ba [poincare] Create a method editableOperand in expression to avoid
const_cast

Change-Id: Icd5531eb7693ced0214a4be6d0c9f6d1220afea5
2017-10-30 17:09:09 +01:00
Émilie Feral
5e28520b72 [poincare] Clean
Change-Id: Ic5ef6a9632e181a0c3797b2230912f46306f7e1b
2017-10-30 14:04:09 +01:00
Émilie Feral
a18aaa0a7b [poincare] Fix bug in Division::writeTextInBuffer: add parenthesis when
required

Change-Id: I93c1320984aed91102e3b06df29f6baa30f6aca7
2017-10-30 13:58:05 +01:00
Émilie Feral
242eac7f0b [poincare] Fix bug in Multiplication::createDenominator
Change-Id: Ia753fc8e72d5e5c20e639838d4ab00506e48ccc9
2017-10-30 11:35:06 +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
f4fbd43ace [poincare] In Multiplication::immediateBeautify: turn 3/4+PI/4 in
(3+PI)/4

Change-Id: I298115a4fadb237a1cba9aef19709dd3b834853d
2017-10-27 14:06:59 +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
c59d8d7bd5 [poincare] Imporve tangent to resolve tan/sin = 1/cos
Change-Id: I7e23c7f680b6702c373bcc78f553bcb0c22bd574
2017-10-27 11:47:24 +02:00
Émilie Feral
7a54b2b0c4 [poincare] Fix bug
Change-Id: I6232b050f2f1db69c326a3200b4d6ed11856c04b
2017-10-27 10:15:43 +02:00
Émilie Feral
86d23dd0f5 [poincare] Avoid square root monome at denominator
Change-Id: I93e55dce3a8e1b3c8db9721a081b376e8a8a0099
2017-10-26 17:57:17 +02:00