Commit Graph

1406 Commits

Author SHA1 Message Date
Émilie Feral
8126594728 [poincare] Fix Logarithm shallow reduce: log(64,2) = 6log(2,2)= 6
(reduce the created log(2,2))
2017-12-14 10:50:21 +01:00
Émilie Feral
c889bb4092 [poincare] Implement Symbol copy constructor
Change-Id: Ie2bef0ba70f11608fd8aebbfa545f6de2e4872bb
2017-12-05 16:20:22 +01:00
Émilie Feral
4cbe8fbf52 [poincare] Stopping the process inside a SimplificationOrfer call is not
always enable

Change-Id: Iad4cc54d4f9b139e967ead8ee6f8e9635cc39351
2017-12-04 17:57:19 +01:00
Émilie Feral
b3f2f245b0 [poincare] Fix leak when accepting ill-formed matrices-> do not accept
ill-formed matrices

Change-Id: I11a47c832287ac631838b9673174db5fff909f94
2017-12-01 17:22:05 +01:00
Émilie Feral
bd26c499e4 [poincare] In Multiplication::addMissingFactors: fix bug due to creating
a multiplication nested inside a multiplication without reducing it

Change-Id: I2e8174a3714e90e6ecc4edbed0e17e434921e269
2017-12-01 11:54:00 +01:00
Émilie Feral
b5cd6c76ca [poincare] Increase the maximal length of decimal number before
switching to scientific printing

Change-Id: I31c404cc7f89babd279689a48c1adcb33a46da7a
2017-12-01 11:53:59 +01:00
Émilie Feral
164b6bb43e [poincare] Add a preference: numberOfSignificantDigits when layouting
complex

Change-Id: I2195c54c6cde43c42ccc0d180870fff0928aa270
2017-12-01 11:53:59 +01:00
Émilie Feral
81016fa168 [poincare] Get 14 significant digits when writing complex to text
Change-Id: I0bdcc932782dce91d5861acc698e5b2f7a15355c
2017-11-30 10:47:20 +01:00
Émilie Feral
17a643a5a5 [poincare] WirteToText always use MultiplicationSign and Layouts use
MiddleDot

Change-Id: I4ffff6e6634deba376f083ef382e6bec0ff0883b
2017-11-28 17:42:06 +01:00
Émilie Feral
65a87d77d6 [poincare] Cap prime factorizations: cap only prime factors
Change-Id: I6384ced8021d264cbf3a903e1574aeb0a22b7c3f
2017-11-28 14:05:46 +01:00
Émilie Feral
8328342826 [poincare] In round, do not shallow reduce when it involves big
exponentiation

Change-Id: Ia2d0e854eab7bd9dea22679c820935d37ccdc7bd
2017-11-28 11:45:37 +01:00
Émilie Feral
355c39ff43 [poincare] In Power, change name:
RationalExponentInvolvesShouldNotBeReduced ->
RationalExponentShouldNotBeReduced

Change-Id: I98aa93543f1dcf6a88f331c367a8dd3ca68f2d53
2017-11-28 11:44:57 +01:00
Émilie Feral
0b0f765f6b [apps] In calculation, return only approximation when input involves
symbols A-Z

Change-Id: Ibf50fb516b01850c5f93c5153f4d550d3e459028
2017-11-28 11:43:06 +01:00
Émilie Feral
29587bf762 [poincare] Cap the integers that can be prime factorized
Change-Id: Iaf8cd747ac99a586438910bffc90de53e18b7640
2017-11-27 16:13:33 +01:00
Émilie Feral
900fdeaefa [Poincare] Fix commit "Power: do not reduce too big negative power
(999^-999)"

Change-Id: I66073d1378b8c0e429547f4746697c28cc0a8ef8
2017-11-27 11:09:19 +01:00
Émilie Feral
ef97fac5ca [poincare] Fix error in matrix dimension name
Change-Id: I6163cc4529cf9fc825dba208f2a20f4da4d142a1
2017-11-27 11:03:07 +01:00
Émilie Feral
fda382cc0d [poincare] Change name: evaluate->approximate
Change-Id: I649a7c640190713dcf063a4148decd6038e62796
2017-11-24 13:31:44 +01:00
Émilie Feral
76cbd2678d [poincare] Change names: approximate->approximateToScalar
Change-Id: I701451b35909bb577dd729e0ea76a405b9543f23
2017-11-24 12:06:35 +01:00
Émilie Feral
53ea983307 [poincare] Read-me (first version)
Change-Id: I4f88b79eb992c1a08149b555f14955c127a862dd
2017-11-24 11:53:55 +01:00
Émilie Feral
e6762bb25c [poincare] Merge Hierarchy into Expression class
Change-Id: Iea40f14e76dede947ffff1c63d53f6727d730e49
2017-11-24 11:53:39 +01:00
Émilie Feral
b6d261c2b2 [poincare] Factorial: simplification order was needlessly (?)
complicated.

Change-Id: Id0987b734f63bb6306d5c36d90573a770f541728
2017-11-24 09:39:05 +01:00
Émilie Feral
914e9e8806 [poincare] In Integral evalutation, decrease the maximal number of
iteration (for time complexity)

Change-Id: Ie2af42071e128818e5f144c82720d36cac62c51b
2017-11-24 09:36:54 +01:00
Émilie Feral
051f7c4a8a [poincare] Multiplication: fix shallowReduce
Change-Id: I95a1423e19d3d6e020a60736838be27124dc79d4
2017-11-24 09:35:13 +01:00
Émilie Feral
42e407cad5 [poincare] Improve implementation of Division::shallowReduce
Change-Id: Id6b1f6606e5d4aa11b2543151fbba3c7be54551c
2017-11-23 14:53:52 +01:00
Émilie Feral
6f75b54e8b [poincare] Fix: Do not reduce too big power (999^-999)
Change-Id: I46bab384d1700cfc7d8069eb68b0c77efc2b343d
2017-11-23 14:02:41 +01:00
Émilie Feral
cbea9aa091 [poincare] Do not split in prime factors integers that are too big (to
avoid lagging)

Change-Id: Icb70a5ca96fbd8b3eb1c829f8de798df43d54de5
2017-11-22 18:01:38 +01:00
Émilie Feral
f5983c97e6 [poincare] Fix confusion between double and float!
Change-Id: I57a12f85f3e24a80c09de48a3f33e4e81593fc85
2017-11-22 16:46:49 +01:00
Émilie Feral
a536ef58cf [poincare] Fix writeTextInBuffer of Power and Division: add parenthesis
to x^(2/3) and x^y^z

Change-Id: I61bed286260a21b42712eff04d46fc664724c203
2017-11-22 14:18:51 +01:00
Émilie Feral
ff0a72177c [poincare] Fix error in write in buffer: conjugate(2)->conj(2)
Change-Id: I68056b192afc76f50117fd4157d85d5f9fa029db
2017-11-22 13:57:02 +01:00
Romain Goyet
52bdf4a41f Merge branch 'cas_with_app_copy' into python_console 2017-11-21 18:44:38 +01:00
Émilie Feral
e112383ce3 [poincare] In Decimal, do not reduce to rational if exponent is too big
or too small

Change-Id: Ibf80302e6e2ad3242f6d9f2ee7de31de2ef0dd1f
2017-11-21 17:37:04 +01:00
Émilie Feral
f04953d3a4 [poincare] Fix Addition::factorizeOnDenominator
Change-Id: I41f68b51c74acaf01b547276053fbeccaeb948ab
2017-11-20 15:39:28 +01:00
Émilie Feral
2d44374f09 [poincare] Fix bug in TermIsARationalSquareRootOrRational: check that
the only operands of the multiplication are a rational and a square root

Change-Id: I16418363c883798eb7a4056d0fae7d29eb459936
2017-11-20 15:34:10 +01:00
Émilie Feral
cb432e165e [poincare] Cap binomial and permute coefficient reducing
Change-Id: Ib0c08a9788d77025e709d295bf05f30de50e9253
2017-11-20 14:52:21 +01:00
Émilie Feral
d9897dd982 [poincare] Fix Multiplication::shallowReduce, reduce -1 that appear
during factorization

Change-Id: I03cd438358dddf080e64d1582750455668807482
2017-11-20 10:40:13 +01:00
Émilie Feral
fe3fa9bf7c [poincare] Do not simplify power when it is the children of a logarithm
that can simplify

Change-Id: Ibec5a97b4eda0cf25efcbe5ee4f9a99673c0eb8a
2017-11-17 18:07:05 +01:00
Émilie Feral
39ca735f21 [poincare] Improve Logarithm::shallowReduce
Change-Id: Ie0f4c0cb25f7c62c65786f7b3a47583ed7323770
2017-11-17 17:11:36 +01:00
Émilie Feral
1d89a8602f [poincare] Add a context to setExpressionForSymbols in Context
Change-Id: I68b768aec350b75bfcf54a5bede2f9b1cdff7e20
2017-11-17 15:45:11 +01:00
Émilie Feral
9c98cec0d8 [poincare] Implement writeTextInBuffer for symbols using special chars
Change-Id: Ie3de762f3a5fb8d38866fe904ae1b9d7e7486e41
2017-11-17 15:31:51 +01:00
Émilie Feral
c1cd85e191 [poincare] Inverse symbol and value order in Symbols to fix infixLayout
Change-Id: Ibc29a0d6819b1e3d3de1c2ea140a57cf85b20129
2017-11-17 15:31:24 +01:00
Émilie Feral
37dd3db06e [poincare] Do not simplify expressions with matrix
Change-Id: I0b4c5fabf3e0669c50ecefc95a2896e945b8c5d9
2017-11-17 13:34:47 +01:00
Émilie Feral
b3f8156cfe [poincare] Fix Expression::IsMatrix
Change-Id: I7956ba5c293431f91020e2211245da8fafdd5e1b
2017-11-17 13:34:47 +01:00
Émilie Feral
bfcd1377e6 [poincare] In Simplification order, matricial node are the biggest nodes
Change-Id: I2c5e391eb6f6476123199906575485c8635eb672
2017-11-17 13:34:47 +01:00
Émilie Feral
8df9bc7b14 [poincare] Rule: e^(i*pi*r) -> cos(r*pi)+i*sin(r*pi)
Change-Id: I9afa1903a5bd38896d9b39aa15658110f493d06f
2017-11-17 13:34:47 +01:00
Émilie Feral
6cb9ccbe63 [poincare] Rule i^r -> e^(iPir') with r rational
Change-Id: I6453406e6888776844c0fe1ff0c7fe2a450d1f6e
2017-11-17 13:34:46 +01:00
Émilie Feral
e651a62ddb [poincare] Treat I as a symbol instead of evaluating at parsing
Change-Id: I95d7bb1e1a85784622bc8780ebd8b8d90c822e6d
2017-11-17 13:34:46 +01:00
Émilie Feral
53c66baa16 [poincare] Re-enable matrix in simplified expression-> handle matrix in
evaluate

Change-Id: I455845398f0799b9e25fd192ada7478c872ab892
2017-11-17 13:34:46 +01:00
Émilie Feral
47621e0cf4 [poincare] Fix bug in writeTextInBuffer in Power: Power(2,Pi+cos(2)) ->
2^(Pi+cos(2)) (do not forget parenthesis)

Change-Id: I841d28412891efd8569501775c472f9f6d34c242
2017-11-17 13:34:46 +01:00
Émilie Feral
f59581b313 [poincare] We do not have to put matrix at root anymore as matrix are
going to be handle in evaluate soon

Change-Id: Id04c164148ce4ef3fc1be078c3ea73801ac7c0a8
2017-11-17 13:34:46 +01:00
Émilie Feral
8289264cfa [poincare] Fix BinomialCoefficient::shallowReduce
Change-Id: Iafc84162427db910e0c208297efe9904ce768313
2017-11-17 13:34:38 +01:00