Commit Graph

3247 Commits

Author SHA1 Message Date
É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
Émilie Feral
d5fc8d139f [poincare] First version of Simplification with matrix (no tests yet!)
Change-Id: I28ad4750ad31995836b23725f7d715669fcb7ae2
2017-11-10 15:22:33 +01:00
Émilie Feral
8aa4444337 [poincare] Rather check for undefined operand in shallowReduce instead
of in deepReduce

Change-Id: I6db09297c75867178d83f27909f915b53ec161c9
2017-11-10 15:13:44 +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
a698611f01 [poincare] Add a NaturalOrder static method on Rational
Change-Id: I081b5ede2477032f840410236e73e2fc1f9def7a
2017-11-09 15:16:57 +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
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