Commit Graph

3011 Commits

Author SHA1 Message Date
Émilie Feral
0a6ff2edb0 [poincare] When building hierarchical expression, give a parent to
children

Change-Id: Ibeadbe98dc1ecde29be3b3c5e5d1cc9537c3c38a
2017-09-29 16:33:39 +02:00
Émilie Feral
29f10251a1 [poincare] Add rule 968750^(1/3) -> 25*62^(1/3)
Change-Id: I24115a5b25ef99cf1e40752b5ac4f7da1e2c0b9e
2017-09-29 14:48:00 +02:00
Émilie Feral
ada3ed5b11 [poincare] Improve arithmetics
Change-Id: I95b03b254cceb90978d0e0848af41f647f24274a
2017-09-29 14:41:31 +02:00
Émilie Feral
695e2fd132 [poincare] In simplification, transform root(2,3) -> 2^(3^(-1))
Change-Id: Ib10ad48498213125f0a7b0587d488156361ca40c
2017-09-29 11:42:28 +02:00
Émilie Feral
ee14968466 [poincare] Simplification: implement special cases of
Int*Int^-1+Int*Int^-1 -> Int*Int^-1

Change-Id: If21238b65ee36791aa8eb4f8ce71f4d2a32b7395
2017-09-29 11:17:01 +02:00
Émilie Feral
f8b0261e2e [poincare] Fix sorting in selectors
Change-Id: I9e8909d5e4774289be163f646b4472b69b35b318
2017-09-29 11:11:31 +02:00
Émilie Feral
3890ad1c54 [poincare] Clean: better names, int -> Int
Change-Id: Ie75fec491dde48fcc2044c0a0928e943e0d57f50
2017-09-29 09:57:45 +02:00
Émilie Feral
9549e8ae85 [poincare] add a rule: int^int-> int or int^(-1)
Change-Id: I871c2e235debaac009c9d5e252e260ec3e0fc1d5
2017-09-29 09:50:41 +02:00
Émilie Feral
a3bd02b8ca [poincare] add a rule to transform -a->(-1)*a
Change-Id: Ia80254e8c02e0c3571c97e7e55e3b043efafd80c
2017-09-28 17:51:17 +02:00
Émilie Feral
5d57b9d997 [poincare] Clean
Change-Id: Ic6ab491e714590a95cff2608949131d82fefd417
2017-09-28 16:59:33 +02:00
Émilie Feral
43e0f530d9 [poincare] Simplification: factorize implementation of int addition and
multiplication transform

Change-Id: Ie03d534693b1cfc9a6e4a66919be5f6b368aff41
2017-09-28 16:54:11 +02:00
Émilie Feral
caa10965c0 [poincare] In simplification, add rule to add fractions
Change-Id: I3bd62684447b2bb25aafae619dea40325faa2813
2017-09-28 16:18:46 +02:00
Émilie Feral
db9afebc8a [poincare] In integer, create layout for negative integers also
Change-Id: Ia0347fe1891a00f0669a8c0685af73a1b09f3e15
2017-09-28 16:17:55 +02:00
Émilie Feral
b5c06fd22b [poincare] Implement Integer::Division in Z (relative integers)
Change-Id: I72ccd4afd8188b0389b1f32863ecb1af59581c04
2017-09-28 16:17:32 +02:00
Émilie Feral
4ffa26be2b [poincare] In simplification, add a symbol (!) for partial match in
rulegen

Change-Id: I0aae2d92f4827bcdcea9efe5f474f5d64da8e2fd
2017-09-28 10:12:11 +02:00
Émilie Feral
38ee1ef1df [poincare] Sort selectors before creating rules
Change-Id: I51da663d83f5759c499c14f603511e3b9cb3f92f
2017-09-27 18:58:26 +02:00
Émilie Feral
c5324de471 [poincare] Add const qualifiers in Rulegen::Node
Change-Id: I236c139890f11ed5611c0bb79d82a06196e149e5
2017-09-27 18:58:26 +02:00
Émilie Feral
273efcc2f9 [poincare] Fix convention on compareTo
Change-Id: Ia1a7f2f23b93bec6a856da04baf109dfe8f49980
2017-09-27 18:58:26 +02:00
Émilie Feral
308c48daf8 [poincare] Add rule to reduce fraction
Change-Id: I2509f61e44962e0618b6447c982d869ac3f4efb2
2017-09-27 18:58:14 +02:00
Émilie Feral
97bcac3fce [poincare] Improve rulegen: create other selectors
Change-Id: Ib80ae188378c589213356cc6e82f53592f9b91e8
2017-09-27 16:44:04 +02:00
Émilie Feral
92e047bf9f [poincare/simplification] add integer fraction reduction transformation
Change-Id: I28dfe64bceb0863c781e631f80ff2684b22670b9
2017-09-27 16:17:45 +02:00
Émilie Feral
5d0dcbee1a [poincare] Change API of arithmetic
Change-Id: I1a558c5e269b5f3585feb2e031d0283e38a8f76b
2017-09-27 16:14:48 +02:00
Émilie Feral
6baa8d3d2a [poincare] Add a const qualifier on isNegative method in Integer
Change-Id: I85d23cda3e1b8603df471174b576502ae75b5f5e
2017-09-27 16:14:12 +02:00
Émilie Feral
83d1179993 [poincare] Implement copy constructor and copy assignment operator of
Integer

Change-Id: Iaed652f31c3336da5471727cf4c9190bec34d51e
2017-09-27 16:13:43 +02:00
Émilie Feral
372478a142 [poincare] Parse decimal number in fraction instead of complex
Change-Id: I52dd5dff950a1adf6abfe1281079f68333be5a66
2017-09-27 12:07:50 +02:00
Émilie Feral
553fa730de [poincare] add tests on arithmetic functions
Change-Id: Iac54616ebf8281179b5e832003a643da9122b007
2017-09-26 18:19:40 +02:00
Émilie Feral
fabe21e6ad [poincare] Fix integer identifier
Change-Id: I11a327330bb50ddd2308c856f610a758ca4d4e32
2017-09-26 18:18:55 +02:00
Émilie Feral
76c4a82bb5 [poincare] Add tests on integer division
Change-Id: I83bc1807c3ab265bd73960740f223b1df556447d
2017-09-26 17:11:16 +02:00
Émilie Feral
be1f2be60f [poincare] Repair tests
Change-Id: Ie14d3c1afc0c8e66d4b0eddb2919958391c5c959
2017-09-26 16:38:22 +02:00
Émilie Feral
d12615ab8d [poincare] Temporary fix of setParentRecursively
Change-Id: I7ebacb1d531dac17da43fa3c8cd0ed98af8c365e
2017-09-26 16:32:12 +02:00
Émilie Feral
4d2255d087 [poincare] Fix bounded static hierarchy
Change-Id: I7b6bee4eb40e54410720931074788383a36928b2
2017-09-26 16:31:17 +02:00
Émilie Feral
2a9f044887 [poincare] Add a debug method to print prime factorization
Change-Id: I7dfa25bd67cdc1c5388f718aa7363c4dd52c0b66
2017-09-26 16:07:52 +02:00
Émilie Feral
5f6e668d81 [poincare] Implement GCD and prime factorization
Change-Id: I900b6f52f74f21fee8f6e2c1df1e06c9b579f19a
2017-09-26 16:07:52 +02:00
Émilie Feral
f05a143dea [poincare] Add a sign getter in Integer
Change-Id: Iad63c3f2d4950f14cf93243379439d7af5596d78
2017-09-26 16:07:52 +02:00
Émilie Feral
483a8b1028 [poincare] Add a method to set sign on Integer
Change-Id: I88094af48775ff273eee0de198726bd91b33d5fe
2017-09-26 16:07:52 +02:00
Émilie Feral
febcea6955 [poincare] In Integer, create a static method Division returning a
struct

Change-Id: I1eb84a79c69e15cd815df87fe7b56bc7327c53be
2017-09-26 16:07:52 +02:00
Émilie Feral
59a4992a7d [poincare] Repair integer create layout
Change-Id: I05d1badc6b499b4aa4a989ddb686a88163ae6abb
2017-09-26 16:07:52 +02:00
Émilie Feral
5ef5410b6f [poincare] Change Fraction->Division
Change-Id: If8f06c60976a02b1b43439a0cea91fb0fee8e930
2017-09-26 16:07:36 +02:00
Émilie Feral
c1a65654d7 [poincare] Clean Macro in integer
Change-Id: I0e9ebe49921269b3812e9e7a1f496465e52738aa
2017-09-25 15:04:44 +02:00
Émilie Feral
0979a26685 [poincare] Change checksum to identifier
Change-Id: I9e132ea5d731f9f3092a399c0b7fd883e3c22abd
2017-09-25 14:55:30 +02:00
Émilie Feral
ceeb43cd5f [poincare] Change comparesTo + virtual nodeCompareTo -> virtual compareTo
Change-Id: Ie54b3652ad1d5845f084b4b49ca0eb96198b853a
2017-09-25 14:54:12 +02:00
Émilie Feral
19b606c825 [poincare] Reel -> Real
Change-Id: Idaf6d7f6f885f0584a8444ab5503738e5499348a
2017-09-25 14:26:36 +02:00
Romain Goyet
b064fabad9 [poincare] Clean the Integer class
Change-Id: I010f571b521a5c45f6131040d396dc0241517728
2017-09-25 14:24:50 +02:00
Romain Goyet
34c51ed239 [poincare] Clean Expression::isCommutative 2017-09-25 14:06:45 +02:00
Émilie Feral
230aac6c06 [poincare] Clean rulegen parser
Change-Id: Ic5e8d8e894ad071d262e3e265a7350ecdddb5384
2017-09-25 14:06:44 +02:00
Émilie Feral
704f8e4a50 [poincare] Clean simplification selector
Change-Id: I225f50ac62556ee2b6105208381ec8f4138cea94
2017-09-25 14:06:40 +02:00
Émilie Feral
5d01277ab2 [poincare] Update gitignore to ignore rulegen files
Change-Id: If76c86c98f5050326580c9d6faf9cae3f327dadc
2017-09-25 10:38:08 +02:00
Émilie Feral
590f15da65 [poincare] Add implementation of type and value selector
Change-Id: I79cf70e40a3b7415bdb54123cc1b3a7e03273504
2017-09-25 10:31:57 +02:00
Émilie Feral
ae22615901 [poincare] Add an instance in selectors (partial match)
Change-Id: Ibe24dccd10bd6bc818ff7c25d76c911b3020cdd4
2017-09-25 10:04:51 +02:00
Romain Goyet
fd0141337c [poincare] Add RemoveParenthesisTransform and IntegerMultiplicationTransform 2017-09-24 21:31:00 +02:00