Commit Graph

1406 Commits

Author SHA1 Message Date
É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
44434a3e17 [poincare] Add a rule in Logarithm::shallowReduce
Change-Id: Ib3c4bc485065865e2579869c5d151c2bdf6a2b3a
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
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
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
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
Ian Abbott
3c6aa41d59 [poincare] Rename ReelPart in enum class Type
Reel => Real
2017-11-06 21:52:57 +01:00
Ian Abbott
91542cedaa [poincare] Rename class ReelPart and its constructor
Reel => Real
2017-11-06 21:52:57 +01:00
Ian Abbott
23e22d34e7 [poincare] Rename reel_part.h and reel_part.cpp
reel => real
2017-11-06 21:52:57 +01:00
Émilie Feral
79ad725af3 [poincare] Clean multiplication
Change-Id: I33fabd9c416b7c0cdbac6864d2bf52c439cbd890
2017-11-06 11:26:08 +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
ad86e76963 [poincare] Use Static Hierarchy shortcut constructor
Change-Id: I59f58df85ed8682913bb09dd60d316a4b3c18ddb
2017-11-03 13:06:05 +01:00
Émilie Feral
9a74d22bd9 [poincare] Change names: child->operand
Change-Id: Ib15e317c8166e4ad73752cc11b6597b86214b35e
2017-11-02 13:59: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
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
f7065717af [poincare] Rational::immediateSimplify: (-1)/3 -> - (1/3)
Change-Id: Ie92c1e852b85214c41ec328cf6e4f0f360e48e16
2017-10-27 14:33:55 +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
86d23dd0f5 [poincare] Avoid square root monome at denominator
Change-Id: I93e55dce3a8e1b3c8db9721a081b376e8a8a0099
2017-10-26 17:57:17 +02:00
Émilie Feral
57b9d996a7 [poincare] ArcTangent::immediateSimplify
Change-Id: I9c1f8d817361d625ccf8c1732d6886edf8d7118f
2017-10-26 10:01:14 +02:00
Émilie Feral
6781a83054 [poincare] Test for Undefined operand before calling immediateSimplify
Change-Id: I4baf8e004cc62700b8ad026dcd8be0ae8ebefbeb
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
bf2e0c7714 [poincare] Fix Multiplication::writeTextInBuffer
Change-Id: Ib61305168bd7dcf9857bf5b69e628d84ff13bb08
2017-10-26 10:01:13 +02:00